diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2024-11-08 16:54:48 -0500 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2024-11-08 16:54:48 -0500 |
commit | c9db5322ae39a49db0728a0a4cb5003efb6ae668 (patch) | |
tree | 4c2530b99a92e2e2b14f70092b2deffc06f1fe85 /gcc | |
parent | 3a1da8ffb71af1005c5a035d0eb5f956056adf32 (diff) | |
download | gcc-c9db5322ae39a49db0728a0a4cb5003efb6ae668.zip gcc-c9db5322ae39a49db0728a0a4cb5003efb6ae668.tar.gz gcc-c9db5322ae39a49db0728a0a4cb5003efb6ae668.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/pa/predicates.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/pa/predicates.md b/gcc/config/pa/predicates.md index 0defd22..a27b2b1 100644 --- a/gcc/config/pa/predicates.md +++ b/gcc/config/pa/predicates.md @@ -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; |