Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. InstSimplifyPass ---------------------------------------- define i1 @test1(i32 %x) { #0: br i1 1, label %a, label %b b: %bb = or i32 %x, 10 br label %c a: %aa = or i32 %x, 10 br label %c c: %cc = phi i32 [ %bb, %b ], [ %aa, %a ] %d = urem i32 %cc, 2 %e = icmp eq i32 %d, 0 ret i1 %e } Transformation seems to be correct! (syntactically equal) -- 3. InstSimplifyPass ---------------------------------------- define i1 @test1(i32 %x) { #0: br i1 1, label %a, label %b b: %bb = or i32 %x, 10 br label %c a: %aa = or i32 %x, 10 br label %c c: %cc = phi i32 [ %bb, %b ], [ %aa, %a ] %d = urem i32 %cc, 2 %e = icmp eq i32 %d, 0 ret i1 %e } Transformation seems to be correct! (syntactically equal) -- 4. PassManager<Function> : Skipping NOP -- 5. PassManager<Function> : Skipping NOP -- 6. InstSimplifyPass ---------------------------------------- define i32 @lcssa-phi(i32 %x) { entry: br label %end end: %counter.lcssa = phi i32 [ %x, %entry ] ret i32 %counter.lcssa } Transformation seems to be correct! (syntactically equal) -- 7. InstSimplifyPass ---------------------------------------- define i32 @lcssa-phi(i32 %x) { entry: br label %end end: %counter.lcssa = phi i32 [ %x, %entry ] ret i32 %counter.lcssa } => define i32 @lcssa-phi(i32 %x) { entry: br label %end end: ret i32 %x } Transformation seems to be correct! -- 8. PassManager<Function> : Skipping NOP -- 9. PassManager<Function> : Skipping NOP -- 10. InstSimplifyPass ---------------------------------------- define i32 @poison(i1 %cond, i32 %v) { #0: br i1 %cond, label %A, label %B B: br label %EXIT A: br label %EXIT EXIT: %w = phi i32 [ %v, %A ], [ poison, %B ] ret i32 %w } Transformation seems to be correct! (syntactically equal) -- 11. InstSimplifyPass ---------------------------------------- define i32 @poison(i1 %cond, i32 %v) { #0: br i1 %cond, label %A, label %B B: br label %EXIT A: br label %EXIT EXIT: %w = phi i32 [ %v, %A ], [ poison, %B ] ret i32 %w } => define i32 @poison(i1 %cond, i32 %v) { #0: br i1 %cond, label %A, label %B B: br label %EXIT A: br label %EXIT EXIT: ret i32 %v } Transformation seems to be correct! -- 12. PassManager<Function> : Skipping NOP -- 13. PassManager<Function> : Skipping NOP -- 14. InstSimplifyPass ---------------------------------------- define i32 @undef(i1 %cond, i32 %v) { #0: br i1 %cond, label %A, label %B B: br label %EXIT A: br label %EXIT EXIT: %w = phi i32 [ %v, %A ], [ undef, %B ] ret i32 %w } Transformation seems to be correct! (syntactically equal) -- 15. InstSimplifyPass ---------------------------------------- define i32 @undef(i1 %cond, i32 %v) { #0: br i1 %cond, label %A, label %B B: br label %EXIT A: br label %EXIT EXIT: %w = phi i32 [ %v, %A ], [ undef, %B ] ret i32 %w } => define i32 @undef(i1 %cond, i32 %v) { #0: br i1 %cond, label %A, label %B B: br label %EXIT A: br label %EXIT EXIT: ret i32 %v } Transformation doesn't verify! (unsound) ERROR: Target is more poisonous than source Example: i1 %cond = #x0 (0) i32 %v = poison Source: >> Jump to %B >> Jump to %EXIT i32 %w = #x00000000 (0) [based on undef value] Target: >> Jump to %B >> Jump to %EXIT Source value: #x00000000 (0) Target value: poison Pass: InstSimplifyPass 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' '-passes=instsimplify' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats' Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_O7O5yA60_SHa7.bc" ------------------- SMT STATS ------------------- Num queries: 16 Num invalid: 0 Num skips: 0 Num trivial: 12 (42.9%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 10 (62.5%) Num UNSAT: 6 (37.5%) Alive2: Transform doesn't verify; aborting!
RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstSimplify/phi.ll -passes=instsimplify -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstSimplify/phi.ll + /home/nlopes/alive2/build/opt-alive.sh -passes=instsimplify -S + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstSimplify/phi.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstSimplify/phi.ll