Test source: git
Comments: LLVM PR51845
Source: <stdin> ---------------------------------------- define i1 @test(* dereferenceable(2) %arg, * dereferenceable(2) %arg1) { %entry: call void @other_work() %arg.off = gep inbounds * dereferenceable(2) %arg, 1 x i64 1 %arg1.off = gep inbounds * dereferenceable(2) %arg1, 1 x i64 1 %arg.off.val = load i8, * %arg.off, align 1 %arg1.off.val = load i8, * %arg1.off, align 1 %cmp.off = icmp eq i8 %arg.off.val, %arg1.off.val br i1 %cmp.off, label %if, label %join %if: %arg.val = load i8, * dereferenceable(2) %arg, align 1 %arg1.val = load i8, * dereferenceable(2) %arg1, align 1 %cmp = icmp eq i8 %arg.val, %arg1.val br label %join %join: %phi = phi i1 [ 0, %entry ], [ %cmp, %if ] ret i1 %phi } => define i1 @test(* dereferenceable(2) %arg, * dereferenceable(2) %arg1) { %if+entry: call void @other_work() %memcmp = memcmp * dereferenceable(2) %arg, * dereferenceable(2) %arg1, i64 2 %0 = icmp eq i32 %memcmp, 0 br label %join %join: ret i1 %0 } Transformation doesn't verify! ERROR: Target is more poisonous than source Example: * dereferenceable(2) %arg = pointer(non-local, block_id=1, offset=3) * dereferenceable(2) %arg1 = pointer(non-local, block_id=1, offset=1) Source: * %arg.off = pointer(non-local, block_id=1, offset=4) * %arg1.off = pointer(non-local, block_id=1, offset=2) i8 %arg.off.val = #x01 (1) i8 %arg1.off.val = #x00 (0) i1 %cmp.off = #x0 (0) >> Jump to %join i1 %phi = #x0 (0) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 address: 0 Block 1 > size: 9 align: 4 alloc type: 0 address: 2 Block 2 > size: 0 align: 8 alloc type: 2 address: 11 Block 3 > align: 4 alloc type: 0 address: 2 Target: i32 %memcmp = poison i1 %0 = poison >> Jump to %join Source value: #x0 (0) Target value: poison ------------------- SMT STATS ------------------- Num queries: 6 Num invalid: 0 Num skips: 0 Num trivial: 9 (60.0%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 4 (66.7%) Num UNSAT: 2 (33.3%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/MergeICmps/X86/no-gep-other-work.ll + /home/nuno/alive2/build/opt-alive.sh -S -mergeicmps FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/MergeICmps/X86/no-gep-other-work.ll