Test source: git
Comments: LLVM PR45954
Source: <stdin> ---------------------------------------- define i32 @t0_ult_slt_65536(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 65536 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } => define i32 @t0_ult_slt_65536(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %1 = icmp slt i32 %x, 0 %2 = icmp sgt i32 %x, 65535 %3 = select i1 %1, i32 %replacement_low, i32 %x %r = select i1 %2, i32 %replacement_high, i32 %3 ret i32 %r } Transformation seems to be correct! ---------------------------------------- define i32 @t1_ult_slt_0(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 0 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } => define i32 @t1_ult_slt_0(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %1 = icmp slt i32 %x, 0 %2 = icmp sgt i32 %x, 65535 %3 = select i1 %1, i32 %replacement_low, i32 %x %r = select i1 %2, i32 %replacement_high, i32 %3 ret i32 %r } Transformation seems to be correct! ---------------------------------------- define i32 @t2_ult_sgt_65536(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp sgt i32 %x, 65535 %t1 = select i1 %t0, i32 %replacement_high, i32 %replacement_low %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } => define i32 @t2_ult_sgt_65536(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %1 = icmp slt i32 %x, 0 %2 = icmp sgt i32 %x, 65535 %3 = select i1 %1, i32 %replacement_low, i32 %x %r = select i1 %2, i32 %replacement_high, i32 %3 ret i32 %r } Transformation seems to be correct! ---------------------------------------- define i32 @t3_ult_sgt_neg1(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp sgt i32 %x, 4294967295 %t1 = select i1 %t0, i32 %replacement_high, i32 %replacement_low %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } => define i32 @t3_ult_sgt_neg1(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %1 = icmp slt i32 %x, 0 %2 = icmp sgt i32 %x, 65535 %3 = select i1 %1, i32 %replacement_low, i32 %x %r = select i1 %2, i32 %replacement_high, i32 %3 ret i32 %r } Transformation seems to be correct! ---------------------------------------- define i32 @t4_ugt_slt_65536(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 65536 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ugt i32 %x, 65535 %r = select i1 %t2, i32 %t1, i32 %x ret i32 %r } => define i32 @t4_ugt_slt_65536(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %1 = icmp slt i32 %x, 0 %2 = icmp sgt i32 %x, 65535 %3 = select i1 %1, i32 %replacement_low, i32 %x %r = select i1 %2, i32 %replacement_high, i32 %3 ret i32 %r } Transformation seems to be correct! ---------------------------------------- define i32 @t5_ugt_slt_0(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 0 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ugt i32 %x, 65535 %r = select i1 %t2, i32 %t1, i32 %x ret i32 %r } => define i32 @t5_ugt_slt_0(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %1 = icmp slt i32 %x, 0 %2 = icmp sgt i32 %x, 65535 %3 = select i1 %1, i32 %replacement_low, i32 %x %r = select i1 %2, i32 %replacement_high, i32 %3 ret i32 %r } Transformation seems to be correct! ---------------------------------------- define i32 @t6_ugt_sgt_65536(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp sgt i32 %x, 65535 %t1 = select i1 %t0, i32 %replacement_high, i32 %replacement_low %t2 = icmp ugt i32 %x, 65535 %r = select i1 %t2, i32 %t1, i32 %x ret i32 %r } => define i32 @t6_ugt_sgt_65536(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %1 = icmp slt i32 %x, 0 %2 = icmp sgt i32 %x, 65535 %3 = select i1 %1, i32 %replacement_low, i32 %x %r = select i1 %2, i32 %replacement_high, i32 %3 ret i32 %r } Transformation seems to be correct! ---------------------------------------- define i32 @t7_ugt_sgt_neg1(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp sgt i32 %x, 4294967295 %t1 = select i1 %t0, i32 %replacement_high, i32 %replacement_low %t2 = icmp ugt i32 %x, 65535 %r = select i1 %t2, i32 %t1, i32 %x ret i32 %r } => define i32 @t7_ugt_sgt_neg1(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %1 = icmp slt i32 %x, 0 %2 = icmp sgt i32 %x, 65535 %3 = select i1 %1, i32 %replacement_low, i32 %x %r = select i1 %2, i32 %replacement_high, i32 %3 ret i32 %r } Transformation seems to be correct! ---------------------------------------- define i32 @n8_ult_slt_65537(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 65537 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } => define i32 @n8_ult_slt_65537(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 65537 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } Transformation seems to be correct! (syntactically equal) ---------------------------------------- define i32 @n9_ult_slt_neg1(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 4294967295 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } => define i32 @n9_ult_slt_neg1(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 4294967295 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } Transformation seems to be correct! (syntactically equal) ---------------------------------------- define i32 @n10_oneuse0(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ult i32 %x, 65536 call void @use1(i1 %t2) %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } => define i32 @n10_oneuse0(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ult i32 %x, 65536 call void @use1(i1 %t2) %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } Transformation seems to be correct! (syntactically equal) ---------------------------------------- define i32 @n11_oneuse1(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 call void @use1(i1 %t0) %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } => define i32 @n11_oneuse1(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 call void @use1(i1 %t0) %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } Transformation seems to be correct! (syntactically equal) ---------------------------------------- define i32 @n12_oneuse2(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high call void @use32(i32 %t1) %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } => define i32 @n12_oneuse2(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high call void @use32(i32 %t1) %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } Transformation seems to be correct! (syntactically equal) ---------------------------------------- define i32 @n13_oneuse3(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 call void @use1(i1 %t0) %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ult i32 %x, 65536 call void @use1(i1 %t2) %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } => define i32 @n13_oneuse3(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 call void @use1(i1 %t0) %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high %t2 = icmp ult i32 %x, 65536 call void @use1(i1 %t2) %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } Transformation seems to be correct! (syntactically equal) ---------------------------------------- define i32 @n14_oneuse4(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 call void @use1(i1 %t0) %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high call void @use32(i32 %t1) %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } => define i32 @n14_oneuse4(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 call void @use1(i1 %t0) %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high call void @use32(i32 %t1) %t2 = icmp ult i32 %x, 65536 %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } Transformation seems to be correct! (syntactically equal) ---------------------------------------- define i32 @n15_oneuse5(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high call void @use32(i32 %t1) %t2 = icmp ult i32 %x, 65536 call void @use1(i1 %t2) %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } => define i32 @n15_oneuse5(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high call void @use32(i32 %t1) %t2 = icmp ult i32 %x, 65536 call void @use1(i1 %t2) %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } Transformation seems to be correct! (syntactically equal) ---------------------------------------- define i32 @n16_oneuse6(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 call void @use1(i1 %t0) %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high call void @use32(i32 %t1) %t2 = icmp ult i32 %x, 65536 call void @use1(i1 %t2) %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } => define i32 @n16_oneuse6(i32 %x, i32 %replacement_low, i32 %replacement_high) { %0: %t0 = icmp slt i32 %x, 32768 call void @use1(i1 %t0) %t1 = select i1 %t0, i32 %replacement_low, i32 %replacement_high call void @use32(i32 %t1) %t2 = icmp ult i32 %x, 65536 call void @use1(i1 %t2) %r = select i1 %t2, i32 %x, i32 %t1 ret i32 %r } Transformation seems to be correct! (syntactically equal) ---------------------------------------- define <2 x i32> @t17_ult_slt_vec_splat(<2 x i32> %x, <2 x i32> %replacement_low, <2 x i32> %replacement_high) { %0: %t0 = icmp slt <2 x i32> %x, { 65536, 65536 } %t1 = select <2 x i1> %t0, <2 x i32> %replacement_low, <2 x i32> %replacement_high %t2 = icmp ult <2 x i32> %x, { 65536, 65536 } %r = select <2 x i1> %t2, <2 x i32> %x, <2 x i32> %t1 ret <2 x i32> %r } => define <2 x i32> @t17_ult_slt_vec_splat(<2 x i32> %x, <2 x i32> %replacement_low, <2 x i32> %replacement_high) { %0: %1 = icmp slt <2 x i32> %x, { 0, 0 } %2 = icmp sgt <2 x i32> %x, { 65535, 65535 } %3 = select <2 x i1> %1, <2 x i32> %replacement_low, <2 x i32> %x %r = select <2 x i1> %2, <2 x i32> %replacement_high, <2 x i32> %3 ret <2 x i32> %r } Transformation seems to be correct! ---------------------------------------- define <2 x i32> @t18_ult_slt_vec_nonsplat(<2 x i32> %x, <2 x i32> %replacement_low, <2 x i32> %replacement_high) { %0: %t0 = icmp slt <2 x i32> %x, { 65536, 32768 } %t1 = select <2 x i1> %t0, <2 x i32> %replacement_low, <2 x i32> %replacement_high %t2 = icmp ult <2 x i32> %x, { 65536, 32768 } %r = select <2 x i1> %t2, <2 x i32> %x, <2 x i32> %t1 ret <2 x i32> %r } => define <2 x i32> @t18_ult_slt_vec_nonsplat(<2 x i32> %x, <2 x i32> %replacement_low, <2 x i32> %replacement_high) { %0: %1 = icmp slt <2 x i32> %x, { 0, 0 } %2 = icmp sgt <2 x i32> %x, { 65535, 32767 } %3 = select <2 x i1> %1, <2 x i32> %replacement_low, <2 x i32> %x %r = select <2 x i1> %2, <2 x i32> %replacement_high, <2 x i32> %3 ret <2 x i32> %r } Transformation seems to be correct! ---------------------------------------- define <3 x i32> @t19_ult_slt_vec_undef0(<3 x i32> %x, <3 x i32> %replacement_low, <3 x i32> %replacement_high) { %0: %t0 = icmp slt <3 x i32> %x, { 65536, undef, 65536 } %t1 = select <3 x i1> %t0, <3 x i32> %replacement_low, <3 x i32> %replacement_high %t2 = icmp ult <3 x i32> %x, { 65536, 65536, 65536 } %r = select <3 x i1> %t2, <3 x i32> %x, <3 x i32> %t1 ret <3 x i32> %r } => define <3 x i32> @t19_ult_slt_vec_undef0(<3 x i32> %x, <3 x i32> %replacement_low, <3 x i32> %replacement_high) { %0: %1 = icmp slt <3 x i32> %x, { 0, 0, 0 } %2 = icmp sgt <3 x i32> %x, { 65535, 65535, 65535 } %3 = select <3 x i1> %1, <3 x i32> %replacement_low, <3 x i32> %x %r = select <3 x i1> %2, <3 x i32> %replacement_high, <3 x i32> %3 ret <3 x i32> %r } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define <3 x i32> @t20_ult_slt_vec_undef1(<3 x i32> %x, <3 x i32> %replacement_low, <3 x i32> %replacement_high) { %0: %t0 = icmp slt <3 x i32> %x, { 65536, 65537, 65536 } %t1 = select <3 x i1> %t0, <3 x i32> %replacement_low, <3 x i32> %replacement_high %t2 = icmp ult <3 x i32> %x, { 65536, undef, 65536 } %r = select <3 x i1> %t2, <3 x i32> %x, <3 x i32> %t1 ret <3 x i32> %r } => define <3 x i32> @t20_ult_slt_vec_undef1(<3 x i32> %x, <3 x i32> %replacement_low, <3 x i32> %replacement_high) { %0: %1 = icmp slt <3 x i32> %x, { 0, 0, 0 } %2 = icmp sgt <3 x i32> %x, { 65535, 65535, 65535 } %3 = select <3 x i1> %1, <3 x i32> %replacement_low, <3 x i32> %x %r = select <3 x i1> %2, <3 x i32> %replacement_high, <3 x i32> %3 ret <3 x i32> %r } Transformation doesn't verify! ERROR: Target is more poisonous than source Example: <3 x i32> %x = < poison, #x00010000 (65536), poison > <3 x i32> %replacement_low = < poison, any, poison > <3 x i32> %replacement_high = < poison, poison, poison > Source: <3 x i1> %t0 = < poison, #x1 (1), poison > <3 x i32> %t1 = < poison, any, poison > <3 x i1> %t2 = < poison, any, poison > <3 x i32> %r = < poison, any, poison > Target: <3 x i1> %1 = < poison, #x0 (0), poison > <3 x i1> %2 = < poison, #x1 (1), poison > <3 x i32> %3 = < poison, #x00010000 (65536), poison > <3 x i32> %r = < poison, poison, poison > Source value: < poison, any, poison > Target value: < poison, poison, poison > ------------------- SMT STATS ------------------- Num queries: 53 Num invalid: 0 Num skips: 0 Num trivial: 44 (45.4%) Num timeout: 1 (1.9%) Num errors: 0 (0.0%) Num SAT: 15 (28.3%) Num UNSAT: 37 (69.8%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -instcombine -S + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/canonicalize-clamp-like-pattern-between-zero-and-positive-threshold.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/canonicalize-clamp-like-pattern-between-zero-and-positive-threshold.ll