This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix reassoc cut&pasto


I guess this was a cut&pasto.  I caught it during code review.  It
doesn't seem to matter much: I haven't been able to get any codegen
difference from this change, not in a bootstrap, not in test runs.  I
even put a gcc_unreachable() in case the test on rhs2 were to return
false (which would never happen after the test on rhs1 passed, when rhs1
and rhs2 were the same), and still no hits in stage3.  Anyway...

Regstrapped on x86_64-linux-gnu.  Ok to install?

From: Alexandre Oliva <aoliva@redhat.com>

for  gcc/ChangeLog

	* tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
---
 gcc/tree-ssa-reassoc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 41a37ab29899..6b0bf5c03548 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -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;


-- 
Alexandre Oliva, freedom fighter   https://FSFLA.org/blogs/lxo
Be the change, be Free!         FSF Latin America board member
GNU Toolchain Engineer                Free Software Evangelist


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]