@@ -1453,13 +1453,12 @@ build_boolop (tree_code code, tree arg0, tree arg1)
{
/* Build a vector comparison.
VEC_COND_EXPR <e1 op e2, { -1, -1, -1, -1 }, { 0, 0, 0, 0 }>; */
- tree type = TREE_TYPE (arg0);
- tree cmptype = truth_type_for (type);
+ tree cmptype = truth_type_for (TREE_TYPE (arg0));
tree cmp = fold_build2_loc (input_location, code, cmptype, arg0, arg1);
- return fold_build3_loc (input_location, VEC_COND_EXPR, type, cmp,
- build_minus_one_cst (type),
- build_zero_cst (type));
+ return fold_build3_loc (input_location, VEC_COND_EXPR, cmptype, cmp,
+ build_minus_one_cst (cmptype),
+ build_zero_cst (cmptype));
}
if (code == EQ_EXPR || code == NE_EXPR)
new file mode 100644
@@ -0,0 +1,12 @@
+// { dg-options "-fdump-tree-gimple" }
+// { dg-additional-options "-mavx" { target avx_runtime } }
+// { dg-do compile { target { avx_runtime || vect_sizes_16B_8B } } }
+
+alias f4 = __vector(float[4]);
+
+auto pr108945(f4 a, f4 b)
+{
+ return a < b;
+}
+
+// { dg-final { scan-tree-dump-not "VEC_COND_EXPR" "gimple" } }