@@ -9524,7 +9524,8 @@ expand_cond_expr_using_cmove (tree treeop0 ATTRIBUTE_UNUSED,
EXPAND_NORMAL);
if (TREE_CODE (treeop0) == SSA_NAME
- && (srcstmt = get_def_for_expr_class (treeop0, tcc_comparison)))
+ && (srcstmt = get_def_for_expr_class (treeop0, tcc_comparison))
+ && !VECTOR_TYPE_P (TREE_TYPE (gimple_assign_rhs1 (srcstmt))))
{
type = TREE_TYPE (gimple_assign_rhs1 (srcstmt));
enum tree_code cmpcode = gimple_assign_rhs_code (srcstmt);
@@ -9534,7 +9535,8 @@ expand_cond_expr_using_cmove (tree treeop0 ATTRIBUTE_UNUSED,
unsignedp = TYPE_UNSIGNED (type);
comparison_code = convert_tree_comp_to_rtx (cmpcode, unsignedp);
}
- else if (COMPARISON_CLASS_P (treeop0))
+ else if (COMPARISON_CLASS_P (treeop0)
+ && !VECTOR_TYPE_P (TREE_TYPE (TREE_OPERAND (treeop0, 0))))
{
type = TREE_TYPE (TREE_OPERAND (treeop0, 0));
enum tree_code cmpcode = TREE_CODE (treeop0);
new file mode 100644
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-msse4" { target { x86_64-*-* i?86-*-* } } } */
+
+long x[2];
+
+int
+foo (int c)
+{
+ long x0 = x[0], x1 = x[1];
+ int t = x0 != 0 | x1 != 0;
+ c *= t;
+ return c;
+}