Test source: git
Source: <stdin> ---------------------------------------- define i32 @foo(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %e = icmp slt i32 %a, %b %f = sext i1 %e to i32 %g = and i32 %c, %f %h = xor i32 %f, 4294967295 %i = and i32 %d, %h %j = or i32 %g, %i ret i32 %j } => define i32 @foo(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %e = icmp slt i32 %a, %b %1 = select i1 %e, i32 %c, i32 %d ret i32 %1 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define i32 @bar(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %e = icmp slt i32 %a, %b %f = sext i1 %e to i32 %g = and i32 %c, %f %h = xor i32 %f, 4294967295 %i = and i32 %d, %h %j = or i32 %i, %g ret i32 %j } => define i32 @bar(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %e.not = icmp slt i32 %a, %b %1 = select i1 %e.not, i32 %c, i32 %d ret i32 %1 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define i32 @goo(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %t0 = icmp slt i32 %a, %b %iftmp.0.0 = select i1 %t0, i32 4294967295, i32 0 %t1 = and i32 %iftmp.0.0, %c %not = xor i32 %iftmp.0.0, 4294967295 %t2 = and i32 %not, %d %t3 = or i32 %t1, %t2 ret i32 %t3 } => define i32 @goo(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %t0 = icmp slt i32 %a, %b %1 = select i1 %t0, i32 %c, i32 %d ret i32 %1 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define i32 @poo(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %t0 = icmp slt i32 %a, %b %iftmp.0.0 = select i1 %t0, i32 4294967295, i32 0 %t1 = and i32 %iftmp.0.0, %c %iftmp = select i1 %t0, i32 0, i32 4294967295 %t2 = and i32 %iftmp, %d %t3 = or i32 %t1, %t2 ret i32 %t3 } => define i32 @poo(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %t0 = icmp slt i32 %a, %b %t3 = select i1 %t0, i32 %c, i32 %d ret i32 %t3 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define i32 @fold_inverted_icmp_preds(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %cmp1 = icmp slt i32 %a, %b %sel1 = select i1 %cmp1, i32 %c, i32 0 %cmp2 = icmp sge i32 %a, %b %sel2 = select i1 %cmp2, i32 %d, i32 0 %or = or i32 %sel1, %sel2 ret i32 %or } => define i32 @fold_inverted_icmp_preds(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %cmp1 = icmp slt i32 %a, %b %sel1 = select i1 %cmp1, i32 %c, i32 0 %cmp2.not = icmp slt i32 %a, %b %sel2 = select i1 %cmp2.not, i32 0, i32 %d %or = or i32 %sel1, %sel2 ret i32 %or } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define i32 @fold_inverted_icmp_preds_reverse(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %cmp1 = icmp slt i32 %a, %b %sel1 = select i1 %cmp1, i32 0, i32 %c %cmp2 = icmp sge i32 %a, %b %sel2 = select i1 %cmp2, i32 0, i32 %d %or = or i32 %sel1, %sel2 ret i32 %or } => define i32 @fold_inverted_icmp_preds_reverse(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %cmp1 = icmp slt i32 %a, %b %sel1 = select i1 %cmp1, i32 0, i32 %c %cmp2.not = icmp slt i32 %a, %b %sel2 = select i1 %cmp2.not, i32 %d, i32 0 %or = or i32 %sel1, %sel2 ret i32 %or } Transformation seems to be correct! ---------------------------------------- define i32 @fold_inverted_fcmp_preds(float %a, float %b, i32 %c, i32 %d) { %0: %cmp1 = fcmp olt float %a, %b %sel1 = select i1 %cmp1, i32 %c, i32 0 %cmp2 = fcmp uge float %a, %b %sel2 = select i1 %cmp2, i32 %d, i32 0 %or = or i32 %sel1, %sel2 ret i32 %or } => define i32 @fold_inverted_fcmp_preds(float %a, float %b, i32 %c, i32 %d) { %0: %cmp1 = fcmp olt float %a, %b %sel1 = select i1 %cmp1, i32 %c, i32 0 %cmp2 = fcmp uge float %a, %b %sel2 = select i1 %cmp2, i32 %d, i32 0 %or = or i32 %sel1, %sel2 ret i32 %or } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define <2 x i32> @fold_inverted_icmp_vector_preds(<2 x i32> %a, <2 x i32> %b, <2 x i32> %c, <2 x i32> %d) { %0: %cmp1 = icmp ne <2 x i32> %a, %b %sel1 = select <2 x i1> %cmp1, <2 x i32> %c, <2 x i32> { 0, 0 } %cmp2 = icmp eq <2 x i32> %a, %b %sel2 = select <2 x i1> %cmp2, <2 x i32> %d, <2 x i32> { 0, 0 } %or = or <2 x i32> %sel1, %sel2 ret <2 x i32> %or } => define <2 x i32> @fold_inverted_icmp_vector_preds(<2 x i32> %a, <2 x i32> %b, <2 x i32> %c, <2 x i32> %d) { %0: %cmp1.not = icmp eq <2 x i32> %a, %b %sel1 = select <2 x i1> %cmp1.not, <2 x i32> { 0, 0 }, <2 x i32> %c %cmp2 = icmp eq <2 x i32> %a, %b %sel2 = select <2 x i1> %cmp2, <2 x i32> %d, <2 x i32> { 0, 0 } %or = or <2 x i32> %sel1, %sel2 ret <2 x i32> %or } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define i32 @par(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %t0 = icmp slt i32 %a, %b %iftmp.1.0 = select i1 %t0, i32 4294967295, i32 0 %t1 = and i32 %iftmp.1.0, %c %not = xor i32 %iftmp.1.0, 4294967295 %t2 = and i32 %not, %d %t3 = or i32 %t1, %t2 ret i32 %t3 } => define i32 @par(i32 %a, i32 %b, i32 %c, i32 %d) { %0: %t0 = icmp slt i32 %a, %b %1 = select i1 %t0, i32 %c, i32 %d ret i32 %1 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define <2 x i64> @bitcast_select_swap0(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %sext = sext <4 x i1> %cmp to <4 x i32> %bc1 = bitcast <4 x i32> %sext to <2 x i64> %and1 = and <2 x i64> %bc1, %sia %neg = xor <4 x i32> %sext, { 4294967295, 4294967295, 4294967295, 4294967295 } %bc2 = bitcast <4 x i32> %neg to <2 x i64> %and2 = and <2 x i64> %bc2, %sib %or = or <2 x i64> %and1, %and2 ret <2 x i64> %or } => define <2 x i64> @bitcast_select_swap0(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %1 = bitcast <2 x i64> %sia to <4 x i32> %2 = bitcast <2 x i64> %sib to <4 x i32> %3 = select <4 x i1> %cmp, <4 x i32> %1, <4 x i32> %2 %4 = bitcast <4 x i32> %3 to <2 x i64> ret <2 x i64> %4 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define <2 x i64> @bitcast_select_swap1(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %sext = sext <4 x i1> %cmp to <4 x i32> %bc1 = bitcast <4 x i32> %sext to <2 x i64> %and1 = and <2 x i64> %bc1, %sia %neg = xor <4 x i32> %sext, { 4294967295, 4294967295, 4294967295, 4294967295 } %bc2 = bitcast <4 x i32> %neg to <2 x i64> %and2 = and <2 x i64> %bc2, %sib %or = or <2 x i64> %and2, %and1 ret <2 x i64> %or } => define <2 x i64> @bitcast_select_swap1(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %1 = bitcast <2 x i64> %sia to <4 x i32> %2 = bitcast <2 x i64> %sib to <4 x i32> %3 = select <4 x i1> %cmp, <4 x i32> %1, <4 x i32> %2 %4 = bitcast <4 x i32> %3 to <2 x i64> ret <2 x i64> %4 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define <2 x i64> @bitcast_select_swap2(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %sext = sext <4 x i1> %cmp to <4 x i32> %bc1 = bitcast <4 x i32> %sext to <2 x i64> %and1 = and <2 x i64> %bc1, %sia %neg = xor <4 x i32> %sext, { 4294967295, 4294967295, 4294967295, 4294967295 } %bc2 = bitcast <4 x i32> %neg to <2 x i64> %and2 = and <2 x i64> %sib, %bc2 %or = or <2 x i64> %and1, %and2 ret <2 x i64> %or } => define <2 x i64> @bitcast_select_swap2(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %1 = bitcast <2 x i64> %sia to <4 x i32> %2 = bitcast <2 x i64> %sib to <4 x i32> %3 = select <4 x i1> %cmp, <4 x i32> %1, <4 x i32> %2 %4 = bitcast <4 x i32> %3 to <2 x i64> ret <2 x i64> %4 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define <2 x i64> @bitcast_select_swap3(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %sext = sext <4 x i1> %cmp to <4 x i32> %bc1 = bitcast <4 x i32> %sext to <2 x i64> %and1 = and <2 x i64> %bc1, %sia %neg = xor <4 x i32> %sext, { 4294967295, 4294967295, 4294967295, 4294967295 } %bc2 = bitcast <4 x i32> %neg to <2 x i64> %and2 = and <2 x i64> %sib, %bc2 %or = or <2 x i64> %and2, %and1 ret <2 x i64> %or } => define <2 x i64> @bitcast_select_swap3(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %1 = bitcast <2 x i64> %sia to <4 x i32> %2 = bitcast <2 x i64> %sib to <4 x i32> %3 = select <4 x i1> %cmp, <4 x i32> %1, <4 x i32> %2 %4 = bitcast <4 x i32> %3 to <2 x i64> ret <2 x i64> %4 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define <2 x i64> @bitcast_select_swap4(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %sext = sext <4 x i1> %cmp to <4 x i32> %bc1 = bitcast <4 x i32> %sext to <2 x i64> %and1 = and <2 x i64> %sia, %bc1 %neg = xor <4 x i32> %sext, { 4294967295, 4294967295, 4294967295, 4294967295 } %bc2 = bitcast <4 x i32> %neg to <2 x i64> %and2 = and <2 x i64> %bc2, %sib %or = or <2 x i64> %and1, %and2 ret <2 x i64> %or } => define <2 x i64> @bitcast_select_swap4(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %1 = bitcast <2 x i64> %sia to <4 x i32> %2 = bitcast <2 x i64> %sib to <4 x i32> %3 = select <4 x i1> %cmp, <4 x i32> %1, <4 x i32> %2 %4 = bitcast <4 x i32> %3 to <2 x i64> ret <2 x i64> %4 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define <2 x i64> @bitcast_select_swap5(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %sext = sext <4 x i1> %cmp to <4 x i32> %bc1 = bitcast <4 x i32> %sext to <2 x i64> %and1 = and <2 x i64> %sia, %bc1 %neg = xor <4 x i32> %sext, { 4294967295, 4294967295, 4294967295, 4294967295 } %bc2 = bitcast <4 x i32> %neg to <2 x i64> %and2 = and <2 x i64> %bc2, %sib %or = or <2 x i64> %and2, %and1 ret <2 x i64> %or } => define <2 x i64> @bitcast_select_swap5(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %1 = bitcast <2 x i64> %sia to <4 x i32> %2 = bitcast <2 x i64> %sib to <4 x i32> %3 = select <4 x i1> %cmp, <4 x i32> %1, <4 x i32> %2 %4 = bitcast <4 x i32> %3 to <2 x i64> ret <2 x i64> %4 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define <2 x i64> @bitcast_select_swap6(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %sext = sext <4 x i1> %cmp to <4 x i32> %bc1 = bitcast <4 x i32> %sext to <2 x i64> %and1 = and <2 x i64> %sia, %bc1 %neg = xor <4 x i32> %sext, { 4294967295, 4294967295, 4294967295, 4294967295 } %bc2 = bitcast <4 x i32> %neg to <2 x i64> %and2 = and <2 x i64> %sib, %bc2 %or = or <2 x i64> %and1, %and2 ret <2 x i64> %or } => define <2 x i64> @bitcast_select_swap6(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %1 = bitcast <2 x i64> %sia to <4 x i32> %2 = bitcast <2 x i64> %sib to <4 x i32> %3 = select <4 x i1> %cmp, <4 x i32> %1, <4 x i32> %2 %4 = bitcast <4 x i32> %3 to <2 x i64> ret <2 x i64> %4 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define <2 x i64> @bitcast_select_swap7(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %sext = sext <4 x i1> %cmp to <4 x i32> %bc1 = bitcast <4 x i32> %sext to <2 x i64> %and1 = and <2 x i64> %sia, %bc1 %neg = xor <4 x i32> %sext, { 4294967295, 4294967295, 4294967295, 4294967295 } %bc2 = bitcast <4 x i32> %neg to <2 x i64> %and2 = and <2 x i64> %sib, %bc2 %or = or <2 x i64> %and2, %and1 ret <2 x i64> %or } => define <2 x i64> @bitcast_select_swap7(<4 x i1> %cmp, <2 x double> %a, <2 x double> %b) { %0: %sia = fptosi <2 x double> %a to <2 x i64> %sib = fptosi <2 x double> %b to <2 x i64> %1 = bitcast <2 x i64> %sia to <4 x i32> %2 = bitcast <2 x i64> %sib to <4 x i32> %3 = select <4 x i1> %cmp, <4 x i32> %1, <4 x i32> %2 %4 = bitcast <4 x i32> %3 to <2 x i64> ret <2 x i64> %4 } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define <2 x i64> @bitcast_select_multi_uses(<4 x i1> %cmp, <2 x i64> %a, <2 x i64> %b) { %0: %sext = sext <4 x i1> %cmp to <4 x i32> %bc1 = bitcast <4 x i32> %sext to <2 x i64> %and1 = and <2 x i64> %a, %bc1 %neg = xor <4 x i32> %sext, { 4294967295, 4294967295, 4294967295, 4294967295 } %bc2 = bitcast <4 x i32> %neg to <2 x i64> %and2 = and <2 x i64> %b, %bc2 %or = or <2 x i64> %and2, %and1 %add = add <2 x i64> %and2, %bc2 %sub = sub <2 x i64> %or, %add ret <2 x i64> %sub } => define <2 x i64> @bitcast_select_multi_uses(<4 x i1> %cmp, <2 x i64> %a, <2 x i64> %b) { %0: %sext = sext <4 x i1> %cmp to <4 x i32> %bc1 = bitcast <4 x i32> %sext to <2 x i64> %and1 = and <2 x i64> %bc1, %a %1 = bitcast <4 x i32> %sext to <2 x i64> %bc2 = xor <2 x i64> %1, { -1, -1 } %and2 = and <2 x i64> %bc2, %b %or = or <2 x i64> %and2, %and1 %add = add <2 x i64> %and2, %bc2 %sub = sub <2 x i64> %or, %add ret <2 x i64> %sub } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define i1 @bools(i1 %a, i1 %b, i1 %c) { %0: %not = xor i1 %c, 1 %and1 = and i1 %not, %a %and2 = and i1 %c, %b %or = or i1 %and1, %and2 ret i1 %or } => define i1 @bools(i1 %a, i1 %b, i1 %c) { %0: %1 = select i1 %c, i1 %b, i1 %a ret i1 %1 } Transformation seems to be correct! ---------------------------------------- define i1 @bools_logical(i1 %a, i1 %b, i1 %c) { %0: %not = xor i1 %c, 1 %and1 = select i1 %not, i1 %a, i1 0 %and2 = select i1 %c, i1 %b, i1 0 %or = select i1 %and1, i1 1, i1 %and2 ret i1 %or } => define i1 @bools_logical(i1 %a, i1 %b, i1 %c) { %0: %1 = select i1 %c, i1 %b, i1 %a ret i1 %1 } Transformation seems to be correct! ---------------------------------------- define i1 @bools_multi_uses1(i1 %a, i1 %b, i1 %c) { %0: %not = xor i1 %c, 1 %and1 = and i1 %not, %a %and2 = and i1 %c, %b %or = or i1 %and1, %and2 %xor = xor i1 %or, %and1 ret i1 %xor } => define i1 @bools_multi_uses1(i1 %a, i1 %b, i1 %c) { %0: %not = xor i1 %c, 1 %and1 = and i1 %not, %a %1 = select i1 %c, i1 %b, i1 %a %xor = xor i1 %1, %and1 ret i1 %xor } Transformation seems to be correct! ---------------------------------------- define i1 @bools_multi_uses1_logical(i1 %a, i1 %b, i1 %c) { %0: %not = xor i1 %c, 1 %and1 = select i1 %not, i1 %a, i1 0 %and2 = select i1 %c, i1 %b, i1 0 %or = select i1 %and1, i1 1, i1 %and2 %xor = xor i1 %or, %and1 ret i1 %xor } => define i1 @bools_multi_uses1_logical(i1 %a, i1 %b, i1 %c) { %0: %not = xor i1 %c, 1 %and1 = and i1 %not, %a %1 = select i1 %c, i1 %b, i1 %a %xor = xor i1 %1, %and1 ret i1 %xor } Transformation doesn't verify! ERROR: Target is more poisonous than source Example: i1 %a = poison i1 %b = any i1 %c = #x1 (1) Source: i1 %not = #x0 (0) i1 %and1 = #x0 (0) i1 %and2 = any i1 %or = any i1 %xor = any Target: i1 %not = #x0 (0) i1 %and1 = poison i1 %1 = any i1 %xor = poison Source value: any Target value: poison ------------------- SMT STATS ------------------- Num queries: 67 Num invalid: 0 Num skips: 0 Num trivial: 48 (41.7%) Num timeout: 17 (25.4%) Num errors: 0 (0.0%) Num SAT: 23 (34.3%) Num UNSAT: 27 (40.3%)
+ : '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/logical-select.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/logical-select.ll