mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
1c46c7087d
It caused assertions to fire when building Chromium: lib/CodeGen/LiveDebugValues.cpp:331: bool {anonymous}::LiveDebugValues::OpenRangesSet::empty() const: Assertion `Vars.empty() == VarLocs.empty() && "open ranges are inconsistent"' failed. See https://crbug.com/992871#c3 for how to reproduce. > Patch https://reviews.llvm.org/D43256 introduced more aggressive loop layout optimization which depends on profile information. If profile information is not available, the statically estimated profile information(generated by BranchProbabilityInfo.cpp) is used. If user program doesn't behave as BranchProbabilityInfo.cpp expected, the layout may be worse. > > To be conservative this patch restores the original layout algorithm in plain mode. But user can still try the aggressive layout optimization with -force-precise-rotation-cost=true. > > Differential Revision: https://reviews.llvm.org/D65673 llvm-svn: 368579
57 lines
1.8 KiB
LLVM
57 lines
1.8 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=thumbv6m-none-unknown-eabi -tail-dup-placement-threshold=3 < %s | FileCheck %s
|
|
|
|
define hidden void @test() {
|
|
; CHECK-LABEL: test:
|
|
; CHECK: @ %bb.0: @ %entry
|
|
; CHECK-NEXT: movs r0, #1
|
|
; CHECK-NEXT: lsls r1, r0, #2
|
|
; CHECK-NEXT: b .LBB0_2
|
|
; CHECK-NEXT: .LBB0_1: @ %bb2
|
|
; CHECK-NEXT: @ in Loop: Header=BB0_2 Depth=1
|
|
; CHECK-NEXT: cmp r0, #0
|
|
; CHECK-NEXT: bne .LBB0_6
|
|
; CHECK-NEXT: .LBB0_2: @ %switch
|
|
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
|
|
; CHECK-NEXT: adr r2, .LJTI0_0
|
|
; CHECK-NEXT: ldr r2, [r2, r1]
|
|
; CHECK-NEXT: mov pc, r2
|
|
; CHECK-NEXT: @ %bb.3:
|
|
; CHECK-NEXT: .p2align 2
|
|
; CHECK-NEXT: .LJTI0_0:
|
|
; CHECK-NEXT: .long .LBB0_6+1
|
|
; CHECK-NEXT: .long .LBB0_4+1
|
|
; CHECK-NEXT: .long .LBB0_6+1
|
|
; CHECK-NEXT: .long .LBB0_5+1
|
|
; CHECK-NEXT: .LBB0_4: @ %switch
|
|
; CHECK-NEXT: @ in Loop: Header=BB0_2 Depth=1
|
|
; CHECK-NEXT: b .LBB0_1
|
|
; CHECK-NEXT: .LBB0_5: @ %bb
|
|
; CHECK-NEXT: @ in Loop: Header=BB0_2 Depth=1
|
|
; CHECK-NEXT: cmp r0, #0
|
|
; CHECK-NEXT: beq .LBB0_1
|
|
; CHECK-NEXT: .LBB0_6: @ %dead
|
|
entry:
|
|
br label %switch
|
|
|
|
switch: ; preds = %bb2, %entry
|
|
switch i32 undef, label %dead2 [
|
|
i32 0, label %dead
|
|
i32 1, label %bb2
|
|
i32 2, label %dead
|
|
i32 3, label %bb
|
|
]
|
|
|
|
dead: ; preds = %bb2, %bb, %switch, %switch
|
|
unreachable
|
|
|
|
dead2: ; preds = %switch
|
|
unreachable
|
|
|
|
bb: ; preds = %switch
|
|
br i1 undef, label %dead, label %bb2
|
|
|
|
bb2: ; preds = %bb, %switch
|
|
br i1 undef, label %dead, label %switch
|
|
}
|