Test source: git
Source: <stdin> ---------------------------------------- define i1 @test59(* %foo) { %0: %bit = bitcast * %foo to * %gep1 = gep inbounds * %bit, 4 x i64 2 %gep2 = gep inbounds * %foo, 1 x i64 10 %cast1 = bitcast * %gep1 to * %cmp = icmp ult * %cast1, %gep2 %use = ptrtoint * %cast1 to i64 %call = call i32 @test58_d(i64 %use) ret i1 %cmp } => define i1 @test59(* %foo) { %0: %gep1 = gep inbounds * %foo, 1 x i32 8 %1 = ptrtoint * %gep1 to i40 %use = zext i40 %1 to i64 %call = call i32 @test58_d(i64 %use) ret i1 1 } Transformation seems to be correct! ---------------------------------------- define i1 @test60(* %foo, i64 %i, i64 %j) { %0: %bit = bitcast * %foo to * %gep1 = gep inbounds * %bit, 4 x i64 %i %gep2 = gep inbounds * %foo, 1 x i64 %j %cast1 = bitcast * %gep1 to * %cmp = icmp ult * %cast1, %gep2 ret i1 %cmp } => define i1 @test60(* %foo, i64 %i, i64 %j) { %0: %1 = trunc i64 %i to i32 %2 = trunc i64 %j to i32 %gep1.idx = shl nsw i32 %1, 2 %3 = icmp slt i32 %gep1.idx, %2 ret i1 %3 } Transformation doesn't verify! ERROR: Target is more poisonous than source Example: * %foo = pointer(non-local, block_id=1, offset=539104266) i64 %i = #x0000000042060002 (1107689474) i64 %j = #x0000001603e442e4 (94554571492) Source: * %bit = pointer(non-local, block_id=1, offset=539104266) * %gep1 = pointer(non-local, block_id=1, offset=4969862162) * %gep2 = pointer(non-local, block_id=1, offset=95093675758) * %cast1 = pointer(non-local, block_id=1, offset=4969862162) i1 %cmp = #x1 (1) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 32 alloc type: 0 Block 1 > size: 274877906944 align: 2 alloc type: 0 Target: i32 %1 = #x42060002 (1107689474) i32 %2 = #x03e442e4 (65290980) i32 %gep1.idx = poison i1 %3 = poison Source value: #x1 (1) Target value: poison ------------------- SMT STATS ------------------- Num queries: 4 Num invalid: 0 Num skips: 0 Num trivial: 4 (50.0%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 3 (75.0%) Num UNSAT: 1 (25.0%)
+ : 'RUN: at line 2' + /home/nlopes/alive2/scripts/opt-alive.sh -instcombine -S + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/icmp-custom-dl.ll Alive2: Transform doesn't verify; aborting! FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/icmp-custom-dl.ll