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 doesn't verify! (not unsound) ERROR: Timeout -- 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) ptr %mem2 = pointer(non-local, block_id=2, offset=0) 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: 1 align: 2 alloc type: 0 alive: true address: 2 Contents: *: #x04 Block 2 > size: 4 align: 1 alloc type: 0 alive: true address: 4 Contents: *: null, byte offset=0 Target: i8 %lhsc = #x04 (4) i32 %lhsv = #x00000004 (4) 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_vEske4h6_XuEe.bc" ------------------- SMT STATS ------------------- Num queries: 31 Num invalid: 0 Num skips: 0 Num trivial: 17 (35.4%) Num timeout: 1 (3.2%) Num errors: 0 (0.0%) Num SAT: 19 (61.3%) Num UNSAT: 11 (35.5%) 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 + /home/nlopes/alive2/build/opt-alive.sh -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 FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/bcmp-1.ll