From c9db5322ae39a49db0728a0a4cb5003efb6ae668 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Fri, 8 Nov 2024 16:54:48 -0500 Subject: [PATCH] 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 gcc/ChangeLog: * config/pa/predicates.md (base14_operand): Use '&' operator instead of '%' to check displacement alignment. --- gcc/config/pa/predicates.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/pa/predicates.md b/gcc/config/pa/predicates.md index 0defd2282fb..a27b2b1c78d 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;