1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Follow-up for r324429: "[LCSSAVerification] Run verification only when asserts are enabled."

Before r324429 we essentially didn't have a verification of LCSSA, so
no wonder that it has been broken: currently loop-sink breaks it (the
attached test illustrates the failure).

It was detected during a stage2 RA build, so to unbreak it I'm disabling
the check for now.

llvm-svn: 324445
This commit is contained in:
Michael Zolotukhin 2018-02-07 04:24:44 +00:00
parent 37dc2d9629
commit a514df4185
2 changed files with 66 additions and 1 deletions

View File

@ -151,7 +151,7 @@ void LPPassManager::markLoopAsDeleted(Loop &L) {
bool LPPassManager::runOnFunction(Function &F) {
auto &LIWP = getAnalysis<LoopInfoWrapperPass>();
LI = &LIWP.getLoopInfo();
#ifndef NDEBUG
#if 0
DominatorTree *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
#endif
bool Changed = false;
@ -227,8 +227,12 @@ bool LPPassManager::runOnFunction(Function &F) {
// is that LPPassManager might run passes which do not require LCSSA
// form (LoopPassPrinter for example). We should skip verification for
// such passes.
// FIXME: Loop-sink currently break LCSSA. Fix it and reenable the
// verification!
#if 0
if (mustPreserveAnalysisID(LCSSAVerificationPass::ID))
assert(CurrentLoop->isRecursivelyLCSSAForm(*DT, *LI));
#endif
// Then call the regular verifyAnalysis functions.
verifyPreservedAnalysis(P);

View File

@ -437,7 +437,68 @@ define i32 @t7(i32, i32) #0 !prof !0 {
ret i32 10
}
%a = type { i8 }
; CHECK-LABEL: @t8
; CHECK: ret void
define void @t8() !prof !0 {
bb:
br label %bb1
bb1: ; preds = %bb
%tmp = getelementptr inbounds %a, %a* undef, i64 0, i32 0
br label %bb2
bb2: ; preds = %bb16, %bb1
br i1 undef, label %bb16, label %bb3
bb3: ; preds = %bb2
br i1 undef, label %bb16, label %bb4
bb4: ; preds = %bb3
br i1 undef, label %bb5, label %bb16
bb5: ; preds = %bb4
br i1 undef, label %bb16, label %bb6
bb6: ; preds = %bb5
br i1 undef, label %bb16, label %bb7
bb7: ; preds = %bb15, %bb6
br i1 undef, label %bb8, label %bb16
bb8: ; preds = %bb7
br i1 undef, label %bb9, label %bb15
bb9: ; preds = %bb8
br i1 undef, label %bb10, label %bb15
bb10: ; preds = %bb9
br i1 undef, label %bb11, label %bb15
bb11: ; preds = %bb10
br i1 undef, label %bb12, label %bb15
bb12: ; preds = %bb11
%tmp13 = load i8, i8* %tmp, align 8
br i1 undef, label %bb15, label %bb14
bb14: ; preds = %bb12
call void @bar(i8* %tmp)
br label %bb16
bb15: ; preds = %bb12, %bb11, %bb10, %bb9, %bb8
br i1 undef, label %bb16, label %bb7
bb16: ; preds = %bb15, %bb14, %bb7, %bb6, %bb5, %bb4, %bb3, %bb2
br i1 undef, label %bb17, label %bb2
bb17: ; preds = %bb16
ret void
}
declare i32 @foo()
declare void @bar(i8*)
!0 = !{!"function_entry_count", i64 1}
!1 = !{!"branch_weights", i32 1, i32 2000}