fix reassoc cut&pasto
authorAlexandre Oliva <aoliva@redhat.com>
Wed, 22 Aug 2018 03:47:48 +0000 (03:47 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Wed, 22 Aug 2018 03:47:48 +0000 (03:47 +0000)
for  gcc/ChangeLog

* tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.

From-SVN: r263759

gcc/ChangeLog
gcc/tree-ssa-reassoc.c

index 264d183..6cff516 100644 (file)
@@ -1,3 +1,7 @@
+2018-08-22  Alexandre Oliva <aoliva@redhat.com>
+
+       * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
+
 2018-08-21  Marek Polacek  <polacek@redhat.com>
 
        PR c++/86981, Implement -Wpessimizing-move.
index 41a37ab..6b0bf5c 100644 (file)
@@ -618,7 +618,7 @@ is_reassociable_op (gimple *stmt, enum tree_code code, struct loop *loop)
       && has_single_use (gimple_assign_lhs (stmt)))
     {
       tree rhs1 = gimple_assign_rhs1 (stmt);
-      tree rhs2 = gimple_assign_rhs1 (stmt);
+      tree rhs2 = gimple_assign_rhs2 (stmt);
       if (TREE_CODE (rhs1) == SSA_NAME
          && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs1))
        return false;