mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
f4af38fa5f
Summary: This is largely NFC*, in preparation for utilizing ProfileSummaryInfo and BranchFrequencyInfo analyses. In this patch I am only doing the splitting for the New PM, but I can do the same for the legacy PM as a follow-on if this looks good. *Not NFC since for partial unrolling we lose the updates done to the loop traversal (adding new sibling and child loops) - according to Chandler this is not very useful for partial unrolling, but it also means that the debugging flag -unroll-revisit-child-loops no longer works for partial unrolling. Reviewers: chandlerc Subscribers: mehdi_amini, mzolotukhin, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D36157 llvm-svn: 309886
37 lines
732 B
LLVM
37 lines
732 B
LLVM
; RUN: opt -S < %s -loop-unroll -block-freq | FileCheck %s
|
|
; RUN: opt -S < %s -passes='require<opt-remark-emit>,unroll,require<block-freq>' | FileCheck %s
|
|
; Crasher from PR20987.
|
|
|
|
; CHECK: define void @update_loop_info_in_subloops
|
|
; CHECK: entry:
|
|
; CHECK: L:
|
|
; CHECK: L.inner:
|
|
; CHECK: L.inner.latch:
|
|
; CHECK: L.latch:
|
|
; CHECK: L.inner.1:
|
|
; CHECK: L.inner.latch.1:
|
|
; CHECK: L.latch.1:
|
|
|
|
define void @update_loop_info_in_subloops() {
|
|
entry:
|
|
br label %L
|
|
|
|
L:
|
|
%0 = phi i64 [ 1, %entry ], [ %1, %L.latch ]
|
|
br label %L.inner
|
|
|
|
L.inner:
|
|
br label %L.inner.latch
|
|
|
|
L.inner.latch:
|
|
br i1 false, label %L.latch, label %L.inner
|
|
|
|
L.latch:
|
|
%1 = add i64 %0, 1
|
|
%2 = icmp eq i64 %1, 3
|
|
br i1 %2, label %exit, label %L
|
|
|
|
exit:
|
|
ret void
|
|
}
|