Test source: git
Comments: LLVM bug: load type punning. needs byte type
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. InstCombinePass ---------------------------------------- declare i32 @bcmp(ptr, ptr, i32) define i32 @test_simplify1(ptr %mem, i32 %size) { #0: %ret = bcmp ptr %mem, ptr %mem, i32 %size ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 3. InstCombinePass ---------------------------------------- declare i32 @bcmp(ptr, ptr, i32) define i32 @test_simplify1(ptr %mem, i32 %size) { #0: %ret = bcmp ptr %mem, ptr %mem, i32 %size ret i32 %ret } => define i32 @test_simplify1(ptr %mem, i32 %size) { #0: ret i32 0 } Transformation seems to be correct! -- 4. PassManager<Function> : Skipping NOP -- 5. PassManager<Function> : Skipping NOP -- 6. InstCombinePass ---------------------------------------- declare i32 @bcmp(ptr, ptr, i32) define i32 @test_simplify2(ptr %mem1, ptr %mem2) { #0: %ret = bcmp ptr %mem1, ptr %mem2, i32 0 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 7. InstCombinePass ---------------------------------------- declare i32 @bcmp(ptr, ptr, i32) define i32 @test_simplify2(ptr %mem1, ptr %mem2) { #0: %ret = bcmp ptr %mem1, ptr %mem2, i32 0 ret i32 %ret } => define i32 @test_simplify2(ptr %mem1, ptr %mem2) { #0: ret i32 0 } Transformation seems to be correct! -- 8. PassManager<Function> : Skipping NOP -- 9. PassManager<Function> : Skipping NOP -- 10. InstCombinePass ---------------------------------------- declare i32 @bcmp(ptr, ptr, i32) define i32 @test_simplify3(ptr %mem1, ptr %mem2) { #0: %ret = bcmp ptr %mem1, ptr %mem2, i32 1 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 11. InstCombinePass ---------------------------------------- declare i32 @bcmp(ptr, ptr, i32) define i32 @test_simplify3(ptr %mem1, ptr %mem2) { #0: %ret = bcmp ptr %mem1, ptr %mem2, i32 1 ret i32 %ret } => define i32 @test_simplify3(ptr %mem1, ptr %mem2) { #0: %lhsc = load i8, ptr %mem1, align 1 %lhsv = zext i8 %lhsc to i32 %rhsc = load i8, ptr %mem2, align 1 %rhsv = zext i8 %rhsc to i32 %chardiff = sub nsw i32 %lhsv, %rhsv ret i32 %chardiff } Transformation doesn't verify! (unsound) ERROR: Target is more poisonous than source Example: ptr %mem1 = pointer(non-local, block_id=1, offset=0) / Address=#x7 ptr %mem2 = pointer(non-local, block_id=1, offset=0) / Address=#x7 Source: i32 %ret = #x00000000 (0) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: 0 Block 1 > size: 2 align: 1 alloc type: 0 alive: true address: 7 Contents: *: null, byte offset=0 Block 2 > size: 0 align: 1 alloc type: 0 alive: true address: 4 Target: i8 %lhsc = poison i32 %lhsv = poison i8 %rhsc = poison i32 %rhsv = poison i32 %chardiff = 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' '-mtriple=x86_64-unknown-linux-gnu' '-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_XsCwudUG_Dp1P.bc" ------------------- SMT STATS ------------------- Num queries: 35 Num invalid: 0 Num skips: 0 Num trivial: 18 (34.0%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 25 (71.4%) Num UNSAT: 10 (28.6%) Alive2: Transform doesn't verify; aborting!
RUN: at line 4: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/bcmp-1.ll -passes=instcombine -mtriple=x86_64-unknown-linux-gnu -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/bcmp-1.ll + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/bcmp-1.ll + /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -mtriple=x86_64-unknown-linux-gnu -S FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/bcmp-1.ll