hppa: Don't use '%' operator in base14_operand

Division is slow on hppa and mode sizes are powers of 2.  So, we
can use '&' operator to check displacement alignment.

2024-11-08  John David Anglin  <danglin@gcc.gnu.org>

gcc/ChangeLog:

	* config/pa/predicates.md (base14_operand): Use '&' operator
	instead of '%' to check displacement alignment.
This commit is contained in:
John David Anglin 2024-11-08 16:54:48 -05:00
parent 3a1da8ffb7
commit c9db5322ae

View file

@ -285,7 +285,7 @@
return false;
default:
return (INTVAL (op) % GET_MODE_SIZE (mode)) == 0;
return (INTVAL (op) & (GET_MODE_SIZE (mode) - 1)) == 0;
}
return false;