Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor ERROR: Unsupported instruction: %bit = addrspacecast ptr %foo to ptr addrspace(3) ERROR: Unsupported instruction: %bit = addrspacecast ptr %foo to ptr addrspace(1) -- 1. PassManager<Function> : Skipping NOP -- 2. InstCombinePass ---------------------------------------- declare i32 @test58_d(i64) define i1 @test59(ptr %foo) { #0: %gep1 = gep inbounds ptr %foo, 4 x i64 2 %gep2 = gep inbounds ptr %foo, 1 x i64 10 %cmp = icmp ult ptr %gep1, %gep2 %use = ptrtoint ptr %gep1 to i64 %call = call i32 @test58_d(i64 %use) ret i1 %cmp } Transformation seems to be correct! (syntactically equal) -- 3. InstCombinePass ---------------------------------------- declare i32 @test58_d(i64) define i1 @test59(ptr %foo) { #0: %gep1 = gep inbounds ptr %foo, 4 x i64 2 %gep2 = gep inbounds ptr %foo, 1 x i64 10 %cmp = icmp ult ptr %gep1, %gep2, offsetonly %use = ptrtoint ptr %gep1 to i64 %call = call i32 @test58_d(i64 %use) ret i1 %cmp } => declare i32 @test58_d(i64) define i1 @test59(ptr %foo) { #0: %gep1 = gep inbounds nuw ptr %foo, 1 x i32 8 %#1 = ptrtoint ptr %gep1 to i40 %use = zext i40 %#1 to i64 %call = call i32 @test58_d(i64 %use) ret i1 1 } Transformation seems to be correct! -- 4. PassManager<Function> : Skipping NOP -- 5. PassManager<Function> : Skipping NOP -- 6. InstCombinePass -- 7. InstCombinePass -- 8. PassManager<Function> : Skipping NOP -- 9. PassManager<Function> : Skipping NOP -- 10. InstCombinePass ---------------------------------------- define i1 @test60(ptr %foo, i64 %i, i64 %j) { #0: %gep1 = gep inbounds ptr %foo, 4 x i64 %i %gep2 = gep inbounds ptr %foo, 1 x i64 %j %cmp = icmp ult ptr %gep1, %gep2 ret i1 %cmp } Transformation seems to be correct! (syntactically equal) -- 11. InstCombinePass ---------------------------------------- define i1 @test60(ptr %foo, i64 %i, i64 %j) { #0: %gep1 = gep inbounds ptr %foo, 4 x i64 %i %gep2 = gep inbounds ptr %foo, 1 x i64 %j %cmp = icmp ult ptr %gep1, %gep2 ret i1 %cmp } => define i1 @test60(ptr %foo, i64 %i, i64 %j) { #0: %#1 = trunc nsw i64 %i to i32 %gep1.idx = shl nsw i32 %#1, 2 %#2 = trunc nsw i64 %j to i32 %cmp = icmp slt i32 %gep1.idx, %#2 ret i1 %cmp } Transformation doesn't verify! (unsound) ERROR: Target is more poisonous than source Example: ptr %foo = null i64 %i = #x0000000100000000 (4294967296) i64 %j = #x0000000000000000 (0) Source: ptr %gep1 = null ptr %gep2 = null i1 %cmp = #x0 (0) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: 0 Block 1 > size: 0 align: 1 alloc type: 0 alive: true address: 1 Target: i32 %#1 = poison i32 %gep1.idx = poison i32 %#2 = #x00000000 (0) i1 %cmp = poison Source value: #x0 (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_5k6XO4pM_AHtM.bc" ------------------- SMT STATS ------------------- Num queries: 25 Num invalid: 0 Num skips: 0 Num trivial: 13 (34.2%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 18 (72.0%) Num UNSAT: 7 (28.0%) Alive2: Transform doesn't verify; aborting!
/home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/icmp-custom-dl.ll -passes=instcombine -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/icmp-custom-dl.ll # RUN: at line 2 + /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/icmp-custom-dl.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/icmp-custom-dl.ll