* [PATCH, OBVIOUS] rs6000: Remove redundant MEM_P predicate usage
@ 2023-07-10 16:47 Peter Bergner
2023-07-10 22:54 ` Peter Bergner
0 siblings, 1 reply; 2+ messages in thread
From: Peter Bergner @ 2023-07-10 16:47 UTC (permalink / raw)
To: GCC Patches; +Cc: Segher Boessenkool, Michael Meissner, Kewen.Lin
While helping someone on the team debug an issue, I noticed some redundant
tests in a couple of our predicates which can be removed. I'm going to
commit the following as obvious once bootstrap and regtesting come back
clean.
Peter
rs6000: Remove redundant MEM_P predicate usage
The quad_memory_operand and vsx_quad_dform_memory_operand predicates contain
a (match_code "mem") test, making their MEM_P usage redundant. Remove them.
gcc/
* config/rs6000/predicates.md (quad_memory_operand): Remove redundant
MEM_P usage.
(vsx_quad_dform_memory_operand): Likewise.
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index 8479331482e..3552d908e9d 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -912,7 +912,7 @@ (define_predicate "quad_memory_operand"
if (!TARGET_QUAD_MEMORY && !TARGET_SYNC_TI)
return false;
- if (GET_MODE_SIZE (mode) != 16 || !MEM_P (op) || MEM_ALIGN (op) < 128)
+ if (GET_MODE_SIZE (mode) != 16 || MEM_ALIGN (op) < 128)
return false;
return quad_address_p (XEXP (op, 0), mode, false);
@@ -924,7 +924,7 @@ (define_predicate "quad_memory_operand"
(define_predicate "vsx_quad_dform_memory_operand"
(match_code "mem")
{
- if (!TARGET_P9_VECTOR || !MEM_P (op) || GET_MODE_SIZE (mode) != 16)
+ if (!TARGET_P9_VECTOR || GET_MODE_SIZE (mode) != 16)
return false;
return quad_address_p (XEXP (op, 0), mode, false);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH, OBVIOUS] rs6000: Remove redundant MEM_P predicate usage
2023-07-10 16:47 [PATCH, OBVIOUS] rs6000: Remove redundant MEM_P predicate usage Peter Bergner
@ 2023-07-10 22:54 ` Peter Bergner
0 siblings, 0 replies; 2+ messages in thread
From: Peter Bergner @ 2023-07-10 22:54 UTC (permalink / raw)
To: GCC Patches; +Cc: Segher Boessenkool, Michael Meissner, Kewen.Lin
On 7/10/23 11:47 AM, Peter Bergner wrote:
> While helping someone on the team debug an issue, I noticed some redundant
> tests in a couple of our predicates which can be removed. I'm going to
> commit the following as obvious once bootstrap and regtesting come back
> clean.
>
> Peter
>
>
> rs6000: Remove redundant MEM_P predicate usage
>
> The quad_memory_operand and vsx_quad_dform_memory_operand predicates contain
> a (match_code "mem") test, making their MEM_P usage redundant. Remove them.
>
> gcc/
> * config/rs6000/predicates.md (quad_memory_operand): Remove redundant
> MEM_P usage.
> (vsx_quad_dform_memory_operand): Likewise.
Testing was clean as expected. Pushed to trunk.
Peter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-10 22:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-10 16:47 [PATCH, OBVIOUS] rs6000: Remove redundant MEM_P predicate usage Peter Bergner
2023-07-10 22:54 ` Peter Bergner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).