[0/4] rs6000: Improve volatile memory handling
mbox series

Message ID cover.1563642475.git.segher@kernel.crashing.org
Headers show
Series
  • rs6000: Improve volatile memory handling
Related show

Message

Segher Boessenkool July 20, 2019, 5:19 p.m. UTC
Most of our loads and stores are atomic when done on aligned operands.
This patch series cleans up our handling of that a little bit, and makes
us handle a few more cases.

The lwa_operand one has a testcase, which is how I noticed this could
use some improvement.  Looking at the combine dump for that shows
input_operand isn't handled properly, either.  And finally there is
offsettable_mem_operand as well.  I didn't see any other memory
operands we should handle as volatile as well, but who knows :-)

Tested on powerpc64-linux {-m32,-m64}; committing to trunk.


Segher


Segher Boessenkool (4):
  rs6000: New predicate any_memory_operand
  rs6000: Make lwa_operand use any_memory_operand
  rs6000: Make input_operand use any_memory_operand
  rs6000: Make offsettable_mem_operand use any_memory_operand

 gcc/config/rs6000/predicates.md                 | 22 +++++++++++++---------
 gcc/testsuite/gcc.target/powerpc/volatile-mem.c | 16 ++++++++++++++++
 2 files changed, 29 insertions(+), 9 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/powerpc/volatile-mem.c