Message ID | 20191016134216.GC4483@ibm-toto.the-meissners.org |
---|---|
State | New |
Headers | show |
Series | V6, #3 of 17: Update lwa_operand for prefixed PLWA | expand |
On Wed, Oct 16, 2019 at 09:42:16AM -0400, Michael Meissner wrote: > 2019-10-15 Michael Meissner <meissner@linux.ibm.com> > > * config/rs6000/predicates.md (lwa_operand): If the bottom two > bits of the offset for the memory address are non-zero, use PLWA > if prefixed instructions are available. Okay for trunk. Thanks! Segher
Index: gcc/config/rs6000/predicates.md =================================================================== --- gcc/config/rs6000/predicates.md (revision 277017) +++ gcc/config/rs6000/predicates.md (working copy) @@ -932,6 +932,14 @@ (define_predicate "lwa_operand" return false; addr = XEXP (inner, 0); + + /* The LWA instruction uses the DS-form instruction format which requires + that the bottom two bits of the offset must be 0. The prefixed PLWA does + not have this restriction. While the actual load from memory is 32-bits, + we pass in DImode here to test for using a DS instruction. */ + if (address_is_prefixed (addr, DImode, NON_PREFIXED_DS)) + return true; + if (GET_CODE (addr) == PRE_INC || GET_CODE (addr) == PRE_DEC || (GET_CODE (addr) == PRE_MODIFY