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 @memcmp(ptr, ptr, i32) define i32 @test_simplify1(ptr %mem, i32 %size) { #0: %ret = memcmp ptr %mem, ptr %mem, i32 %size ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 3. InstCombinePass ---------------------------------------- declare i32 @memcmp(ptr, ptr, i32) define i32 @test_simplify1(ptr %mem, i32 %size) { #0: %ret = memcmp 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 @memcmp(ptr, ptr, i32) define i32 @test_simplify2(ptr %mem1, ptr %mem2) { #0: %ret = memcmp ptr %mem1, ptr %mem2, i32 0 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 7. InstCombinePass ---------------------------------------- declare i32 @memcmp(ptr, ptr, i32) define i32 @test_simplify2(ptr %mem1, ptr %mem2) { #0: %ret = memcmp 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 @memcmp(ptr, ptr, i32) define i32 @test_simplify3(ptr %mem1, ptr %mem2) { #0: %ret = memcmp ptr %mem1, ptr %mem2, i32 1 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 11. InstCombinePass ---------------------------------------- declare i32 @memcmp(ptr, ptr, i32) define i32 @test_simplify3(ptr %mem1, ptr %mem2) { #0: %ret = memcmp 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: 5 align: 65536 alloc type: 0 alive: true address: 2 Contents: *: #x10 Block 2 > size: 2 align: 1 alloc type: 0 alive: true address: 12 Contents: *: null, byte offset=0 Target: i8 %lhsc = #x10 (16) i32 %lhsv = #x00000010 (16) 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' '-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_oTQnqZmc_qAqO.bc" ------------------- SMT STATS ------------------- Num queries: 29 Num invalid: 0 Num skips: 0 Num trivial: 17 (37.0%) Num timeout: 1 (3.4%) Num errors: 0 (0.0%) Num SAT: 16 (55.2%) Num UNSAT: 12 (41.4%) Alive2: Transform doesn't verify; aborting!
RUN: at line 3: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/memcmp-1.ll -passes=instcombine -S | /bitbucket/nlopes/llvm/build/bin/FileCheck --check-prefix=CHECK --check-prefix=NOBCMP /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/memcmp-1.ll + /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S + /bitbucket/nlopes/llvm/build/bin/FileCheck --check-prefix=CHECK --check-prefix=NOBCMP /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/memcmp-1.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck --check-prefix=CHECK --check-prefix=NOBCMP /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/memcmp-1.ll