static const int arg1_map[] = { 1, 1 };
static const int arg2_map[] = { 1, 2 };
static const int arg1_arg4_map[] = { 2, 1, 4 };
+static const int op1_op0_map[] = { 2, 1, 0 };
/* For most SLP statements, there is a one-to-one mapping between
gimple arguments and child nodes. If that is not true for STMT,
if (gimple_assign_rhs_code (assign) == COND_EXPR
&& COMPARISON_CLASS_P (gimple_assign_rhs1 (assign)))
return cond_expr_maps[swap];
+ if (TREE_CODE_CLASS (gimple_assign_rhs_code (assign)) == tcc_comparison
+ && swap)
+ return op1_op0_map;
}
gcc_assert (!swap);
if (auto call = dyn_cast<const gcall *> (stmt))
&& (alt_stmt_code == PLUS_EXPR
|| alt_stmt_code == MINUS_EXPR)
&& rhs_code == alt_stmt_code)
+ && !(first_stmt_code.is_tree_code ()
+ && rhs_code.is_tree_code ()
+ && (TREE_CODE_CLASS (tree_code (first_stmt_code))
+ == tcc_comparison)
+ && (swap_tree_comparison (tree_code (first_stmt_code))
+ == tree_code (rhs_code)))
&& !(STMT_VINFO_GROUPED_ACCESS (stmt_info)
&& (first_stmt_code == ARRAY_REF
|| first_stmt_code == BIT_FIELD_REF
continue;
}
}
+
+ if (rhs_code.is_tree_code ()
+ && TREE_CODE_CLASS ((tree_code)rhs_code) == tcc_comparison
+ && (swap_tree_comparison ((tree_code)first_stmt_code)
+ == (tree_code)rhs_code))
+ swap[i] = 1;
}
matches[i] = true;
with the permute we are going to use. */
if (alt_stmt_code != ERROR_MARK
&& (!alt_stmt_code.is_tree_code ()
- || TREE_CODE_CLASS (tree_code (alt_stmt_code)) != tcc_reference))
+ || (TREE_CODE_CLASS (tree_code (alt_stmt_code)) != tcc_reference
+ && TREE_CODE_CLASS (tree_code (alt_stmt_code)) != tcc_comparison)))
{
*two_operators = true;
}