Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor ERROR: Unsupported instruction: %x = load volatile i32, ptr %px, align 4 -- 1. PassManager<Function> : Skipping NOP -- 2. EarlyCSEPass ---------------------------------------- define void @test1(float %A, float %B, ptr %PA, ptr %PB) { #0: %C = fadd float %A, %B store float %C, ptr %PA, align 4 %D = fadd float %B, %A store float %D, ptr %PB, align 4 ret void } Transformation seems to be correct! (syntactically equal) -- 3. EarlyCSEPass ---------------------------------------- define void @test1(float %A, float %B, ptr %PA, ptr %PB) { #0: %C = fadd float %A, %B store float %C, ptr %PA, align 4 %D = fadd float %B, %A store float %D, ptr %PB, align 4 ret void } => define void @test1(float %A, float %B, ptr %PA, ptr %PB) { #0: %C = fadd float %A, %B store float %C, ptr %PA, align 4 store float %C, ptr %PB, align 4 ret void } Transformation doesn't verify! (not unsound) ERROR: Timeout -- 4. PassManager<Function> : Skipping NOP -- 5. PassManager<Function> : Skipping NOP -- 6. EarlyCSEPass ---------------------------------------- define void @test2(float %A, float %B, ptr %PA, ptr %PB) { #0: %C = fcmp oeq float %A, %B store i1 %C, ptr %PA, align 1 %D = fcmp oeq float %B, %A store i1 %D, ptr %PB, align 1 ret void } Transformation seems to be correct! (syntactically equal) -- 7. EarlyCSEPass ---------------------------------------- define void @test2(float %A, float %B, ptr %PA, ptr %PB) { #0: %C = fcmp oeq float %A, %B store i1 %C, ptr %PA, align 1 %D = fcmp oeq float %B, %A store i1 %D, ptr %PB, align 1 ret void } => define void @test2(float %A, float %B, ptr %PA, ptr %PB) { #0: %C = fcmp oeq float %A, %B store i1 %C, ptr %PA, align 1 store i1 %C, ptr %PB, align 1 ret void } Transformation seems to be correct! -- 8. PassManager<Function> : Skipping NOP -- 9. PassManager<Function> : Skipping NOP -- 10. EarlyCSEPass ---------------------------------------- define void @test3(float %A, float %B, ptr %PA, ptr %PB) { #0: %C = fcmp uge float %A, %B store i1 %C, ptr %PA, align 1 %D = fcmp ule float %B, %A store i1 %D, ptr %PB, align 1 ret void } Transformation seems to be correct! (syntactically equal) -- 11. EarlyCSEPass ---------------------------------------- define void @test3(float %A, float %B, ptr %PA, ptr %PB) { #0: %C = fcmp uge float %A, %B store i1 %C, ptr %PA, align 1 %D = fcmp ule float %B, %A store i1 %D, ptr %PB, align 1 ret void } => define void @test3(float %A, float %B, ptr %PA, ptr %PB) { #0: %C = fcmp uge float %A, %B store i1 %C, ptr %PA, align 1 store i1 %C, ptr %PB, align 1 ret void } Transformation doesn't verify! (not unsound) ERROR: Timeout -- 12. PassManager<Function> : Skipping NOP -- 13. PassManager<Function> : Skipping NOP -- 14. EarlyCSEPass ---------------------------------------- define void @test4(i32 %A, i32 %B, ptr %PA, ptr %PB) { #0: %C = icmp eq i32 %A, %B store i1 %C, ptr %PA, align 1 %D = icmp eq i32 %B, %A store i1 %D, ptr %PB, align 1 ret void } Transformation seems to be correct! (syntactically equal) -- 15. EarlyCSEPass ---------------------------------------- define void @test4(i32 %A, i32 %B, ptr %PA, ptr %PB) { #0: %C = icmp eq i32 %A, %B store i1 %C, ptr %PA, align 1 %D = icmp eq i32 %B, %A store i1 %D, ptr %PB, align 1 ret void } => define void @test4(i32 %A, i32 %B, ptr %PA, ptr %PB) { #0: %C = icmp eq i32 %A, %B store i1 %C, ptr %PA, align 1 store i1 %C, ptr %PB, align 1 ret void } Transformation seems to be correct! -- 16. PassManager<Function> : Skipping NOP -- 17. PassManager<Function> : Skipping NOP -- 18. EarlyCSEPass ---------------------------------------- define void @test5(i32 %A, i32 %B, ptr %PA, ptr %PB) { #0: %C = icmp sgt i32 %A, %B store i1 %C, ptr %PA, align 1 %D = icmp slt i32 %B, %A store i1 %D, ptr %PB, align 1 ret void } Transformation seems to be correct! (syntactically equal) -- 19. EarlyCSEPass ---------------------------------------- define void @test5(i32 %A, i32 %B, ptr %PA, ptr %PB) { #0: %C = icmp sgt i32 %A, %B store i1 %C, ptr %PA, align 1 %D = icmp slt i32 %B, %A store i1 %D, ptr %PB, align 1 ret void } => define void @test5(i32 %A, i32 %B, ptr %PA, ptr %PB) { #0: %C = icmp sgt i32 %A, %B store i1 %C, ptr %PA, align 1 store i1 %C, ptr %PB, align 1 ret void } Transformation doesn't verify! (not unsound) ERROR: Timeout -- 20. PassManager<Function> : Skipping NOP -- 21. PassManager<Function> : Skipping NOP -- 22. EarlyCSEPass ---------------------------------------- define void @test6(float %f, ptr %p1, ptr %p2) { #0: %c1 = fcmp ult float %f, %f %c2 = fcmp ugt float %f, %f store i1 %c1, ptr %p1, align 1 store i1 %c2, ptr %p2, align 1 ret void } Transformation seems to be correct! (syntactically equal) -- 23. EarlyCSEPass ---------------------------------------- define void @test6(float %f, ptr %p1, ptr %p2) { #0: %c1 = fcmp ult float %f, %f %c2 = fcmp ugt float %f, %f store i1 %c1, ptr %p1, align 1 store i1 %c2, ptr %p2, align 1 ret void } => define void @test6(float %f, ptr %p1, ptr %p2) { #0: %c1 = fcmp ult float %f, %f store i1 %c1, ptr %p1, align 1 store i1 %c1, ptr %p2, align 1 ret void } Transformation seems to be correct! -- 24. PassManager<Function> : Skipping NOP -- 25. PassManager<Function> : Skipping NOP -- 26. EarlyCSEPass ---------------------------------------- define i8 @smin_commute(i8 %a, i8 %b) { #0: %cmp1 = icmp slt i8 %a, %b %cmp2 = icmp slt i8 %b, %a %m1 = select i1 %cmp1, i8 %a, i8 %b %m2 = select i1 %cmp2, i8 %b, i8 %a %r = mul i8 %m1, %m2 ret i8 %r } Transformation seems to be correct! (syntactically equal) -- 27. EarlyCSEPass ---------------------------------------- define i8 @smin_commute(i8 %a, i8 %b) { #0: %cmp1 = icmp slt i8 %a, %b %cmp2 = icmp slt i8 %b, %a %m1 = select i1 %cmp1, i8 %a, i8 %b %m2 = select i1 %cmp2, i8 %b, i8 %a %r = mul i8 %m1, %m2 ret i8 %r } => define i8 @smin_commute(i8 %a, i8 %b) { #0: %cmp1 = icmp slt i8 %a, %b %m1 = select i1 %cmp1, i8 %a, i8 %b %r = mul i8 %m1, %m1 ret i8 %r } Transformation doesn't verify! (unsound) ERROR: Value mismatch Example: i8 %a = #x80 (128, -128) i8 %b = undef Source: i1 %cmp1 = #x1 (1) [based on undef value] i1 %cmp2 = #x0 (0) i8 %m1 = #x80 (128, -128) i8 %m2 = #x80 (128, -128) i8 %r = #x00 (0) Target: i1 %cmp1 = #x0 (0) i8 %m1 = #x08 (8) i8 %r = #x20 (32) Source value: #x00 (0) Target value: #x20 (32) Pass: EarlyCSEPass 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=early-cse' '-earlycse-debug-hash' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats' Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_P2SkOqVk_zptd.bc" ------------------- SMT STATS ------------------- Num queries: 40 Num invalid: 0 Num skips: 0 Num trivial: 44 (52.4%) Num timeout: 5 (12.5%) Num errors: 0 (0.0%) Num SAT: 23 (57.5%) Num UNSAT: 12 (30.0%) Alive2: Transform doesn't verify; aborting!
RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/EarlyCSE/commute.ll -S -passes=early-cse -earlycse-debug-hash | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/EarlyCSE/commute.ll + /home/nlopes/alive2/build/opt-alive.sh -S -passes=early-cse -earlycse-debug-hash + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/EarlyCSE/commute.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/EarlyCSE/commute.ll
NOTE: This test would pass if undef didn't exist!