Test source: git
Source: <stdin> ---------------------------------------- define <2 x i32> @umin_of_nots(<2 x i32> %x, <2 x i32> %y) { %0: %notx = xor <2 x i32> %x, { 4294967295, 4294967295 } %noty = xor <2 x i32> %y, { 4294967295, 4294967295 } %cmp = icmp ult <2 x i32> %notx, %noty %min = select <2 x i1> %cmp, <2 x i32> %notx, <2 x i32> %noty ret <2 x i32> %min } => define <2 x i32> @umin_of_nots(<2 x i32> %x, <2 x i32> %y) { %0: %1 = icmp ugt <2 x i32> %x, %y %2 = select <2 x i1> %1, <2 x i32> %x, <2 x i32> %y %min = xor <2 x i32> %2, { 4294967295, 4294967295 } ret <2 x i32> %min } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define <2 x i32> @smin_of_nots(<2 x i32> %x, <2 x i32> %y) { %0: %notx = xor <2 x i32> %x, { 4294967295, 4294967295 } %noty = xor <2 x i32> %y, { 4294967295, 4294967295 } %cmp = icmp sle <2 x i32> %notx, %noty %min = select <2 x i1> %cmp, <2 x i32> %notx, <2 x i32> %noty ret <2 x i32> %min } => define <2 x i32> @smin_of_nots(<2 x i32> %x, <2 x i32> %y) { %0: %1 = icmp sgt <2 x i32> %x, %y %2 = select <2 x i1> %1, <2 x i32> %x, <2 x i32> %y %min = xor <2 x i32> %2, { 4294967295, 4294967295 } ret <2 x i32> %min } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define i32 @compute_min_2(i32 %x, i32 %y) { %0: %not_x = sub i32 4294967295, %x %not_y = sub i32 4294967295, %y %cmp = icmp sgt i32 %not_x, %not_y %not_min = select i1 %cmp, i32 %not_x, i32 %not_y %min = sub i32 4294967295, %not_min ret i32 %min } => define i32 @compute_min_2(i32 %x, i32 %y) { %0: %1 = icmp slt i32 %x, %y %2 = select i1 %1, i32 %x, i32 %y ret i32 %2 } Transformation seems to be correct! ---------------------------------------- define i8 @umin_not_1_extra_use(i8 %x, i8 %y) { %0: %nx = xor i8 %x, 255 %ny = xor i8 %y, 255 %cmpxy = icmp ult i8 %nx, %ny %minxy = select i1 %cmpxy, i8 %nx, i8 %ny call void @extra_use(i8 %nx) ret i8 %minxy } => define i8 @umin_not_1_extra_use(i8 %x, i8 %y) { %0: %nx = xor i8 %x, 255 %1 = icmp ugt i8 %y, %x %2 = select i1 %1, i8 %y, i8 %x %minxy = xor i8 %2, 255 call void @extra_use(i8 %nx) ret i8 %minxy } Transformation doesn't verify! ERROR: Value mismatch Example: i8 %x = undef i8 %y = #xff (255, -1) Source: i8 %nx = undef i8 %ny = #x00 (0) i1 %cmpxy = #x0 (0) i8 %minxy = #x00 (0) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 64 alloc type: 0 Block 1 > size: 0 align: 4 alloc type: 0 Target: i8 %nx = #x01 (1) i1 %1 = #x0 (0) i8 %2 = #x00 (0) i8 %minxy = #xff (255, -1) Source value: #x00 (0) Target value: #xff (255, -1) ------------------- SMT STATS ------------------- Num queries: 10 Num invalid: 0 Num skips: 0 Num trivial: 8 (44.4%) Num timeout: 2 (20.0%) Num errors: 0 (0.0%) Num SAT: 5 (50.0%) Num UNSAT: 3 (30.0%)
+ : 'RUN: at line 2' + /home/nlopes/alive2/scripts/opt-alive.sh -S -instcombine + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/max-of-nots.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/max-of-nots.ll
NOTE: This test would pass if undef didn't exist!