From: Joern Rennecke Date: Tue, 9 Jul 2019 21:55:31 +0000 (+0000) Subject: tree-vect-stmts.c (vectorizable_comparison): Swap operands only once. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a0aeb7fb93da156b64fd08391c79ff35a69af7ba;p=gcc.git tree-vect-stmts.c (vectorizable_comparison): Swap operands only once. * tree-vect-stmts.c (vectorizable_comparison) : Swap operands only once. From-SVN: r273316 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 71569bfa4d6..4ae2fd81261 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-07-09 Joern Rennecke + + * tree-vect-stmts.c (vectorizable_comparison) : + Swap operands only once. + 2019-07-09 Dragan Mladjenovic * cfgcleanup.c (old_insns_match_p): Check if used hard regs set is equal diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index e921225b5ec..601a6f55fbf 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -10369,7 +10369,7 @@ vectorizable_comparison (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, if (!slp_node) { - if (swap_p) + if (swap_p && j == 0) std::swap (vec_rhs1, vec_rhs2); vec_oprnds0.quick_push (vec_rhs1); vec_oprnds1.quick_push (vec_rhs2);