Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor ERROR: Unsupported instruction: %r = invoke i32 @test5a() to label %exit unwind label %unwind ERROR: Unsupported instruction: %call = invoke i64 %tmp5() to label %cond.end unwind label %ehcleanu ERROR: Unsupported instruction: invoke void @test10a() to label %invoke.cont unwind label %try.handl ERROR: Unsupported instruction: invoke void @test18a() #4 to label %u unwind label %lpad -- 1. PassManager<Function> : Skipping NOP -- 2. InstCombinePass ---------------------------------------- define i32 @test0(i8 %tmp2) { entry: %tmp3 = zext i8 %tmp2 to i32 %tmp8 = lshr i32 %tmp3, 6 %tmp9 = lshr i32 %tmp3, 7 %tmp10 = xor i32 %tmp9, 67108858 %tmp11 = xor i32 %tmp10, %tmp8 %tmp12 = xor i32 %tmp11, 0 ret i32 %tmp12 } Transformation seems to be correct! (syntactically equal) -- 3. InstCombinePass ---------------------------------------- define i32 @test0(i8 %tmp2) { entry: %tmp3 = zext i8 %tmp2 to i32 %tmp8 = lshr i32 %tmp3, 6 %tmp9 = lshr i32 %tmp3, 7 %tmp10 = xor i32 %tmp9, 67108858 %tmp11 = xor i32 %tmp10, %tmp8 %tmp12 = xor i32 %tmp11, 0 ret i32 %tmp12 } => define i32 @test0(i8 %tmp2) { entry: %tmp3 = zext i8 %tmp2 to i32 %tmp8 = lshr i32 %tmp3, 6 %tmp9 = lshr i32 %tmp3, 7 %tmp10 = or disjoint i32 %tmp9, 67108858 %tmp11 = xor i32 %tmp10, %tmp8 ret i32 %tmp11 } Transformation seems to be correct! -- 4. PassManager<Function> : Skipping NOP -- 5. PassManager<Function> : Skipping NOP -- 6. InstCombinePass ---------------------------------------- define <2 x i64> @test1(<2 x i64> %x, <2 x i64> %y) { entry: %conv.i94 = bitcast <2 x i64> %y to <4 x i32> %sub.i97 = sub <4 x i32> %conv.i94, poison %conv3.i98 = bitcast <4 x i32> %sub.i97 to <2 x i64> %conv2.i86 = bitcast <2 x i64> %conv3.i98 to <4 x i32> %cmp.i87 = icmp sgt <4 x i32> poison, %conv2.i86 %sext.i88 = sext <4 x i1> %cmp.i87 to <4 x i32> %conv3.i89 = bitcast <4 x i32> %sext.i88 to <2 x i64> %and.i = and <2 x i64> %conv3.i89, %conv3.i98 %or.i = or <2 x i64> { 0, 0 }, %and.i %conv2.i43 = bitcast <2 x i64> %or.i to <4 x i32> %sub.i = sub <4 x i32> { 0, 0, 0, 0 }, %conv2.i43 %conv3.i44 = bitcast <4 x i32> %sub.i to <2 x i64> ret <2 x i64> %conv3.i44 } Transformation seems to be correct! (syntactically equal) -- 7. InstCombinePass ---------------------------------------- define <2 x i64> @test1(<2 x i64> %x, <2 x i64> %y) { entry: %conv.i94 = bitcast <2 x i64> %y to <4 x i32> %sub.i97 = sub <4 x i32> %conv.i94, poison %conv3.i98 = bitcast <4 x i32> %sub.i97 to <2 x i64> %conv2.i86 = bitcast <2 x i64> %conv3.i98 to <4 x i32> %cmp.i87 = icmp sgt <4 x i32> poison, %conv2.i86 %sext.i88 = sext <4 x i1> %cmp.i87 to <4 x i32> %conv3.i89 = bitcast <4 x i32> %sext.i88 to <2 x i64> %and.i = and <2 x i64> %conv3.i89, %conv3.i98 %or.i = or <2 x i64> { 0, 0 }, %and.i %conv2.i43 = bitcast <2 x i64> %or.i to <4 x i32> %sub.i = sub <4 x i32> { 0, 0, 0, 0 }, %conv2.i43 %conv3.i44 = bitcast <4 x i32> %sub.i to <2 x i64> ret <2 x i64> %conv3.i44 } => define <2 x i64> @test1(<2 x i64> %x, <2 x i64> %y) { entry: ret <2 x i64> poison } Transformation seems to be correct! -- 8. PassManager<Function> : Skipping NOP -- 9. PassManager<Function> : Skipping NOP -- 10. InstCombinePass ---------------------------------------- define void @test2(ptr nocapture %b, ptr nocapture %c) { entry: %arrayidx = gep inbounds ptr nocapture %b, 2 x i64 0 %tmp2 = load <1 x i16>, ptr %arrayidx, align 2 %tmp6 = bitcast <1 x i16> %tmp2 to i16 %tmp7 = zext i16 %tmp6 to i32 %ins = or i32 0, %tmp7 %arrayidx20 = gep inbounds ptr nocapture %c, 4 x i64 0 store i32 %ins, ptr %arrayidx20, align 4 ret void } Transformation seems to be correct! (syntactically equal) -- 11. InstCombinePass ---------------------------------------- define void @test2(ptr nocapture %b, ptr nocapture %c) { entry: %arrayidx = gep inbounds ptr nocapture %b, 2 x i64 0 %tmp2 = load <1 x i16>, ptr %arrayidx, align 2 %tmp6 = bitcast <1 x i16> %tmp2 to i16 %tmp7 = zext i16 %tmp6 to i32 %ins = or i32 0, %tmp7 %arrayidx20 = gep inbounds ptr nocapture %c, 4 x i64 0 store i32 %ins, ptr %arrayidx20, align 4 ret void } => define void @test2(ptr nocapture %b, ptr nocapture %c) { entry: %tmp21 = load i16, ptr nocapture %b, align 2 %tmp7 = zext i16 %tmp21 to i32 store i32 %tmp7, ptr nocapture %c, align 4 ret void } Transformation seems to be correct! -- 12. PassManager<Function> : Skipping NOP -- 13. PassManager<Function> : Skipping NOP -- 14. InstCombinePass ---------------------------------------- declare void @use(i64) @tmp2 = global 8 bytes, align 8 define void @foo(i1 %#0) { #1: br i1 %#0, label %#2, label %#3 #2: br label %#3 #3: %#5 = phi i8 [ 1, %#2 ], [ 0, %#1 ] %#6 = icmp eq i8 %#5, 0 %#7 = load i64, ptr @tmp2, align 8 %#8 = select i1 %#6, i64 0, i64 %#7 br label %#4 #4: call void @use(i64 %#8) ret void } Transformation seems to be correct! (syntactically equal) -- 15. InstCombinePass ---------------------------------------- declare void @use(i64) @tmp2 = global 8 bytes, align 8 define void @foo(i1 %#0) { #1: br i1 %#0, label %#2, label %#3 #2: br label %#3 #3: %#5 = phi i8 [ 1, %#2 ], [ 0, %#1 ] %#6 = icmp eq i8 %#5, 0 %#7 = load i64, ptr @tmp2, align 8 %#8 = select i1 %#6, i64 0, i64 %#7 br label %#4 #4: call void @use(i64 %#8) ret void } => declare void @use(i64) @tmp2 = global 8 bytes, align 8 define void @foo(i1 %#0) { #1: br i1 %#0, label %#2, label %#3 #2: br label %#3 #3: br label %#4 #4: %#5 = load i64, ptr @tmp2, align 8 %#6 = select i1 %#0, i64 %#5, i64 0 call void @use(i64 %#6) ret void } Transformation seems to be correct! -- 16. PassManager<Function> : Skipping NOP -- 17. PassManager<Function> : Skipping NOP -- 18. InstCombinePass ---------------------------------------- declare ptr @bar2(i64) define void @bar3(i1 %#0, i1 %#1) { #2: br i1 %#1, label %#4, label %#3 #3: %#7 = gep inbounds ptr null, 8 x i64 0, 1 x i64 4 %#8 = gep inbounds ptr null, 20 x i64 0, 1 x i64 16 %#9 = load ptr, ptr %#8, align 8 %#10 = icmp ne ptr %#9, null %#11 = zext i1 %#10 to i32 %#12 = add i32 %#11, 0 br label %#4 #4: %#13 = phi i32 [ %#12, %#3 ], [ 0, %#2 ] br i1 %#1, label %#5, label %#6 #5: br label %#6 #6: %#14 = zext i32 %#13 to i64 %#15 = call ptr @bar2(i64 %#14) ret void } Transformation seems to be correct! (syntactically equal) -- 19. InstCombinePass ---------------------------------------- declare ptr @bar2(i64) define void @bar3(i1 %#0, i1 %#1) { #2: br i1 %#1, label %#4, label %#3 #3: %#8 = gep inbounds ptr null, 20 x i64 0, 1 x i64 16 %#9 = load ptr, ptr %#8, align 8 %#10 = icmp ne ptr %#9, null %#11 = zext i1 %#10 to i32 %#12 = add i32 %#11, 0 br label %#4 #4: %#13 = phi i32 [ %#12, %#3 ], [ 0, %#2 ] br i1 %#1, label %#5, label %#6 #5: br label %#6 #6: %#14 = zext i32 %#13 to i64 %#15 = call ptr @bar2(i64 %#14) ret void } => declare ptr @bar2(i64) define void @bar3(i1 %#0, i1 %#1) { #2: br i1 %#1, label %#4, label %#3 #3: %__constexpr_0 = int2ptr i32 16 to ptr %#7 = load ptr, ptr %__constexpr_0, align 8 %#8 = icmp ne ptr %#7, null %#9 = zext i1 %#8 to i32 br label %#4 #4: %#10 = phi i32 [ %#9, %#3 ], [ 0, %#2 ] br i1 %#1, label %#5, label %#6 #5: br label %#6 #6: %#11 = zext nneg i32 %#10 to i64 %#12 = call ptr @bar2(i64 %#11) ret void } Transformation seems to be correct! -- 20. PassManager<Function> : Skipping NOP -- 21. PassManager<Function> : Skipping NOP -- 22. InstCombinePass ---------------------------------------- define i64 @test4(i1 %c, ptr %P) { BB0: br i1 %c, label %BB1, label %BB2 BB1: br label %BB2 BB2: %v5_ = phi i1 [ 1, %BB0 ], [ 0, %BB1 ] %v6 = load i64, ptr %P, align 4 br label %l8 l8: br label %l10 l10: %v11 = select i1 %v5_, i64 0, i64 %v6 ret i64 %v11 } Transformation seems to be correct! (syntactically equal) -- 23. InstCombinePass ---------------------------------------- define i64 @test4(i1 %c, ptr %P) { BB0: br i1 %c, label %BB1, label %BB2 BB1: br label %BB2 BB2: %v5_ = phi i1 [ 1, %BB0 ], [ 0, %BB1 ] %v6 = load i64, ptr %P, align 4 br label %l8 l8: br label %l10 l10: %v11 = select i1 %v5_, i64 0, i64 %v6 ret i64 %v11 } => define i64 @test4(i1 %c, ptr %P) { BB0: br i1 %c, label %BB1, label %BB2 BB1: br label %BB2 BB2: %v6 = load i64, ptr %P, align 4 br label %l8 l8: br label %l10 l10: %v11 = select i1 %c, i64 %v6, i64 0 ret i64 %v11 } Transformation seems to be correct! -- 24. PassManager<Function> : Skipping NOP -- 25. PassManager<Function> : Skipping NOP -- 26. InstCombinePass ---------------------------------------- define i32 @test5a() { #0: ret i32 0 } Transformation seems to be correct! (syntactically equal) -- 27. InstCombinePass ---------------------------------------- define i32 @test5a() { #0: ret i32 0 } Transformation seems to be correct! (syntactically equal) -- 28. PassManager<Function> : Skipping NOP -- 29. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %r = invoke i32 @test5a() to label %exit unwind label %unwind -- 30. InstCombinePass ERROR: Unsupported instruction: %r = invoke i32 @test5a() to label %exit unwind label %unwind -- 31. InstCombinePass ERROR: Unsupported instruction: %r = invoke i32 @test5a() to label %exit unwind label %unwind -- 32. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %r = invoke i32 @test5a() to label %exit unwind label %unwind -- 33. PassManager<Function> : Skipping NOP -- 34. InstCombinePass ---------------------------------------- test6 = constant ? bytes, align 8 @test6g = global 4 bytes, align 4 define i32 @test6(i32 %argc, ptr %argv) { entry: %__constexpr_0 = gep ptr test6, 4 x i32 4294965248 store ptr %__constexpr_0, ptr @test6g, align 4 assume i1 0 } Transformation seems to be correct! (syntactically equal) -- 35. InstCombinePass ---------------------------------------- test6 = constant ? bytes, align 8 @test6g = global 4 bytes, align 4 define i32 @test6(i32 %argc, ptr %argv) { entry: %__constexpr_0 = gep ptr test6, 4 x i32 4294965248 store ptr %__constexpr_0, ptr @test6g, align 4 assume i1 0 } => @test6g = global 4 bytes, align 4 define i32 @test6(i32 %argc, ptr %argv) { entry: assume i1 0 } Transformation seems to be correct! -- 36. PassManager<Function> : Skipping NOP -- 37. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %call = invoke i64 %tmp5() to label %cond.end unwind label %ehcleanu -- 38. InstCombinePass ERROR: Unsupported instruction: %call = invoke i64 %tmp5() to label %cond.end unwind label %ehcleanu -- 39. InstCombinePass ERROR: Unsupported instruction: %call = invoke i64 %tmp5() to label %cond.end unwind label %ehcleanu -- 40. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %call = invoke i64 %tmp5() to label %cond.end unwind label %ehcleanu -- 41. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: invoke void @test10a() to label %invoke.cont unwind label %try.handl -- 42. InstCombinePass ERROR: Unsupported instruction: invoke void @test10a() to label %invoke.cont unwind label %try.handl -- 43. InstCombinePass ERROR: Unsupported instruction: invoke void @test10a() to label %invoke.cont unwind label %try.handl -- 44. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: invoke void @test10a() to label %invoke.cont unwind label %try.handl -- 45. PassManager<Function> : Skipping NOP -- 46. InstCombinePass ---------------------------------------- define void @test10a() { #0: ret void } Transformation seems to be correct! (syntactically equal) -- 47. InstCombinePass ---------------------------------------- define void @test10a() { #0: ret void } Transformation seems to be correct! (syntactically equal) -- 48. PassManager<Function> : Skipping NOP -- 49. PassManager<Function> : Skipping NOP -- 50. InstCombinePass ---------------------------------------- define i32 @test11(i32 %aMaskWidth, i8 %aStride) { entry: %conv41 = sext i8 %aStride to i32 %neg = xor i32 %conv41, 4294967295 %and42 = and i32 %aMaskWidth, %neg %and47 = and i32 130, %conv41 %or = or i32 %and42, %and47 ret i32 %or } Transformation seems to be correct! (syntactically equal) -- 51. InstCombinePass ---------------------------------------- define i32 @test11(i32 %aMaskWidth, i8 %aStride) { entry: %conv41 = sext i8 %aStride to i32 %neg = xor i32 %conv41, 4294967295 %and42 = and i32 %aMaskWidth, %neg %and47 = and i32 130, %conv41 %or = or i32 %and42, %and47 ret i32 %or } => define i32 @test11(i32 %aMaskWidth, i8 %aStride) { entry: %conv41 = sext i8 %aStride to i32 %neg = xor i32 %conv41, 4294967295 %and42 = and i32 %neg, %aMaskWidth %and47 = and i32 %conv41, 130 %or = or disjoint i32 %and42, %and47 ret i32 %or } Transformation doesn't verify! (unsound) ERROR: Target is more poisonous than source Example: i32 %aMaskWidth = undef i8 %aStride = undef Source: i32 %conv41 = #x00000000 (0) [based on undef value] i32 %neg = #xffffffff (4294967295, -1) i32 %and42 = #x00000000 (0) [based on undef value] i32 %and47 = #x00000000 (0) [based on undef value] i32 %or = #x00000000 (0) Target: i32 %conv41 = #x00000000 (0) i32 %neg = #xffffffff (4294967295, -1) i32 %and42 = #x00000002 (2) i32 %and47 = #x00000002 (2) i32 %or = poison Source value: #x00000000 (0) Target value: poison Pass: InstCombinePass 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=instcombine' '-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_pjEDex9a_RWP4.bc" ------------------- SMT STATS ------------------- Num queries: 46 Num invalid: 0 Num skips: 0 Num trivial: 46 (50.0%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 32 (69.6%) Num UNSAT: 14 (30.4%) Alive2: Transform doesn't verify; aborting!
RUN: at line 1: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/crash.ll -passes=instcombine -S + /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S
NOTE: This test would pass if undef didn't exist!