Fix hash of WIDEN_*_EXPR

Message ID 20240722115345.0631B385DDD6@sourceware.org
State Committed
Commit a8e61cd71f0cda04d583722ca4c66301358b01e1
Headers
Series Fix hash of WIDEN_*_EXPR |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply

Commit Message

Richard Biener July 22, 2024, 11:53 a.m. UTC
  We're hashing operand 2 to the temporary hash.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

	* fold-const.cc (operand_compare::hash_operand): Fix hash
	of WIDEN_*_EXPR.
---
 gcc/fold-const.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc
index 7838f32cc26..eeadc8db9f6 100644
--- a/gcc/fold-const.cc
+++ b/gcc/fold-const.cc
@@ -4123,7 +4123,7 @@  operand_compare::hash_operand (const_tree t, inchash::hash &hstate,
 		hash_operand (TREE_OPERAND (t, 0), one, flags);
 		hash_operand (TREE_OPERAND (t, 1), two, flags);
 		hstate.add_commutative (one, two);
-		hash_operand (TREE_OPERAND (t, 2), two, flags);
+		hash_operand (TREE_OPERAND (t, 2), hstate, flags);
 		return;
 	      }