Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. FunctionToLoopPassAdaptor ---------------------------------------- @vtable = constant 8 bytes, align 8 foo = constant ? bytes, align 8 define void @test(i1 %c) { init: store ptr foo, ptr @vtable, align 8 br label %#0 #0: br label %loop loop: %fn = load ptr, ptr @vtable, align 8 call void %fn() br i1 %c, label %exit, label %loop exit: ret void } Transformation seems to be correct! (syntactically equal) -- 3. PassManager<Function> : Skipping NOP -- 4. LoopSimplifyPass ---------------------------------------- @vtable = constant 8 bytes, align 8 foo = constant ? bytes, align 8 define void @test(i1 %c) { init: store ptr foo, ptr @vtable, align 8 br label %#0 #0: br label %loop loop: %fn = load ptr, ptr @vtable, align 8 call void %fn() br i1 %c, label %exit, label %loop exit: ret void } Transformation seems to be correct! (syntactically equal) -- 5. LoopSimplifyPass ---------------------------------------- @vtable = constant 8 bytes, align 8 foo = constant ? bytes, align 8 define void @test(i1 %c) { init: store ptr foo, ptr @vtable, align 8 br label %#0 #0: br label %loop loop: %fn = load ptr, ptr @vtable, align 8 call void %fn() br i1 %c, label %exit, label %loop exit: ret void } Transformation seems to be correct! (syntactically equal) -- 6. LCSSAPass ---------------------------------------- @vtable = constant 8 bytes, align 8 foo = constant ? bytes, align 8 define void @test(i1 %c) { init: store ptr foo, ptr @vtable, align 8 br label %#0 #0: br label %loop loop: %fn = load ptr, ptr @vtable, align 8 call void %fn() br i1 %c, label %exit, label %loop exit: ret void } Transformation seems to be correct! (syntactically equal) -- 7. LCSSAPass ---------------------------------------- @vtable = constant 8 bytes, align 8 foo = constant ? bytes, align 8 define void @test(i1 %c) { init: store ptr foo, ptr @vtable, align 8 br label %#0 #0: br label %loop loop: %fn = load ptr, ptr @vtable, align 8 call void %fn() br i1 %c, 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. LoopInstSimplifyPass ---------------------------------------- @vtable = constant 8 bytes, align 8 foo = constant ? bytes, align 8 define void @test(i1 %c) { init: store ptr foo, ptr @vtable, align 8 br label %#0 #0: br label %loop loop: %fn = load ptr, ptr @vtable, align 8 call void %fn() br i1 %c, label %exit, label %loop exit: ret void } Transformation seems to be correct! (syntactically equal) -- 11. LoopInstSimplifyPass ---------------------------------------- @vtable = constant 8 bytes, align 8 foo = constant ? bytes, align 8 define void @test(i1 %c) { init: store ptr foo, ptr @vtable, align 8 br label %#0 #0: br label %loop loop: %fn = load ptr, ptr @vtable, align 8 call void %fn() br i1 %c, label %exit, label %loop exit: ret void } => declare void @foo() nofree memory(none) @vtable = constant 8 bytes, align 8 foo = constant ? bytes, align 8 define void @test(i1 %c) { init: store ptr foo, ptr @vtable, align 8 br label %#0 #0: br label %loop loop: call void @foo() nofree memory(none) br i1 %c, label %exit, label %loop exit: ret void } Transformation doesn't verify! (unsound) ERROR: Source is more defined than target Example: i1 %c = poison Source: UB triggered on br SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 8 alloc type: 0 alive: false address: 0 Block 1 > size: 8 align: 8 alloc type: 0 alive: true address: 192 const Block 2 > size: 128 align: 8 alloc type: 0 alive: true address: 8 const Block 3 > size: 5 align: 1 alloc type: 0 alive: true address: 2 Block 4 > size: 128 align: 8 alloc type: 0 alive: true address: 0 Target: UB triggered on br Pass: LoopInstSimplifyPass 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=loop-mssa(loop-instsimplify,simple-loop-unswitch<nontrivial>)' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats' Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_JtWn2hxF_LCSs.bc" ------------------- SMT STATS ------------------- Num queries: 15 Num invalid: 0 Num skips: 0 Num trivial: 0 (0.0%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 11 (73.3%) Num UNSAT: 4 (26.7%) Alive2: Transform doesn't verify; aborting!
RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh -S -passes="loop-mssa(loop-instsimplify,simple-loop-unswitch<nontrivial>)" < /bitbucket/nlopes/llvm/llvm/test/Transforms/SimpleLoopUnswitch/memssa-readnone-access.ll | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SimpleLoopUnswitch/memssa-readnone-access.ll + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SimpleLoopUnswitch/memssa-readnone-access.ll + /home/nlopes/alive2/build/opt-alive.sh -S '-passes=loop-mssa(loop-instsimplify,simple-loop-unswitch<nontrivial>)' FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SimpleLoopUnswitch/memssa-readnone-access.ll