Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor ERROR: Unsupported attribute: noalias -- 1. PassManager<Function> : Skipping NOP -- 2. FunctionToLoopPassAdaptor ---------------------------------------- @g = global 4 bytes, align 4 define void @promote_global(i1 %c, i1 %c2) { %entry: br label %loop %loop: br i1 %c, label %if, label %latch %if: %v = load i32, ptr @g, align 4 %v.inc = add i32 %v, 1 store i32 %v.inc, ptr @g, align 4 br label %latch %latch: br i1 %c2, label %exit, label %loop %exit: ret void } Transformation seems to be correct! (syntactically equal) -- 3. PassManager<Function> : Skipping NOP -- 4. LoopSimplifyPass ---------------------------------------- @g = global 4 bytes, align 4 define void @promote_global(i1 %c, i1 %c2) { %entry: br label %loop %loop: br i1 %c, label %if, label %latch %if: %v = load i32, ptr @g, align 4 %v.inc = add i32 %v, 1 store i32 %v.inc, ptr @g, align 4 br label %latch %latch: br i1 %c2, label %exit, label %loop %exit: ret void } Transformation seems to be correct! (syntactically equal) -- 5. LoopSimplifyPass ---------------------------------------- @g = global 4 bytes, align 4 define void @promote_global(i1 %c, i1 %c2) { %entry: br label %loop %loop: br i1 %c, label %if, label %latch %if: %v = load i32, ptr @g, align 4 %v.inc = add i32 %v, 1 store i32 %v.inc, ptr @g, align 4 br label %latch %latch: br i1 %c2, label %exit, label %loop %exit: ret void } Transformation seems to be correct! (syntactically equal) -- 6. LCSSAPass ---------------------------------------- @g = global 4 bytes, align 4 define void @promote_global(i1 %c, i1 %c2) { %entry: br label %loop %loop: br i1 %c, label %if, label %latch %if: %v = load i32, ptr @g, align 4 %v.inc = add i32 %v, 1 store i32 %v.inc, ptr @g, align 4 br label %latch %latch: br i1 %c2, label %exit, label %loop %exit: ret void } Transformation seems to be correct! (syntactically equal) -- 7. LCSSAPass ---------------------------------------- @g = global 4 bytes, align 4 define void @promote_global(i1 %c, i1 %c2) { %entry: br label %loop %loop: br i1 %c, label %if, label %latch %if: %v = load i32, ptr @g, align 4 %v.inc = add i32 %v, 1 store i32 %v.inc, ptr @g, align 4 br label %latch %latch: br i1 %c2, label %exit, label %loop %exit: ret void } Transformation seems to be correct! (syntactically equal) -- 8. PassManager<Function> : Skipping NOP -- 9. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 10. LICMPass ---------------------------------------- @g = global 4 bytes, align 4 define void @promote_global(i1 %c, i1 %c2) { %entry: br label %loop %loop: br i1 %c, label %if, label %latch %if: %v = load i32, ptr @g, align 4 %v.inc = add i32 %v, 1 store i32 %v.inc, ptr @g, align 4 br label %latch %latch: br i1 %c2, label %exit, label %loop %exit: ret void } Transformation seems to be correct! (syntactically equal) -- 11. LICMPass ---------------------------------------- @g = global 4 bytes, align 4 define void @promote_global(i1 %c, i1 %c2) { %entry: br label %loop %loop: br i1 %c, label %if, label %latch %if: %v = load i32, ptr @g, align 4 %v.inc = add i32 %v, 1 store i32 %v.inc, ptr @g, align 4 br label %latch %latch: br i1 %c2, label %exit, label %loop %exit: ret void } => @g = global 4 bytes, align 4 define void @promote_global(i1 %c, i1 %c2) { %entry: %g.promoted = load i32, ptr @g, align 4 br label %loop %loop: %v.inc2 = phi i32 [ %v.inc1, %latch ], [ %g.promoted, %entry ] br i1 %c, label %if, label %latch %if: %v.inc = add i32 %v.inc2, 1 br label %latch %latch: %v.inc1 = phi i32 [ %v.inc, %if ], [ %v.inc2, %loop ] br i1 %c2, label %exit, label %loop %exit: %v.inc1.lcssa = phi i32 [ %v.inc1, %latch ] store i32 %v.inc1.lcssa, ptr @g, align 4 ret void } Transformation doesn't verify! (unsound) ERROR: Mismatch in memory Example: i1 %c = #x0 (0) i1 %c2 = #x1 (1) Source: >> Jump to %loop >> Jump to %latch >> Jump to %exit SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 4 align: 4 alloc type: 0 Target: i32 %g.promoted = poison >> Jump to %loop i32 %v.inc2 = poison >> Jump to %latch i32 %v.inc1 = poison >> Jump to %exit i32 %v.inc1.lcssa = poison Mismatch in pointer(non-local, block_id=0, offset=0) Source value: pointer(non-local, block_id=0, offset=0), byte offset=0 Target value: poison Pass: LICMPass Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-S' '-passes=licm' '-licm-force-thread-model-single' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats' ------------------- SMT STATS ------------------- Num queries: 4 Num invalid: 0 Num skips: 0 Num trivial: 7 (63.6%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 4 (100.0%) Num UNSAT: 0 (0.0%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -S -passes=licm + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LICM/promote-single-thread.ll --check-prefixes=CHECK,MT + : 'RUN: at line 3' + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LICM/promote-single-thread.ll --check-prefixes=CHECK,ST + /home/nlopes/alive2/build/opt-alive.sh -S -passes=licm -licm-force-thread-model-single FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LICM/promote-single-thread.ll --check-prefixes=CHECK,ST