Skip to content
Snippets Groups Projects
Commit 3c32575e authored by Tamar Christina's avatar Tamar Christina
Browse files

middle-end: refactor type to be explicit in operand_equal_p [PR114932]

This is a refactoring with no expected behavioral change.
The goal with this is to make the type of the expressions being used explicit.

I did not change all the recursive calls to operand_equal_p () to recurse
directly to the new function but instead this goes through the top level call
which re-extracts the types.

This was done because in most of the cases where we recurse type == arg.
The second patch makes use of this new flexibility to implement an overload
of operand_equal_p which checks for equality under two's complement.

gcc/ChangeLog:

	PR tree-optimization/114932
	* fold-const.cc (operand_compare::operand_equal_p): Split into one that
	takes explicit type parameters and use that in public one.
	* fold-const.h (class operand_compare): Add operand_equal_p private
	overload.
parent 979e9dbf
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment