diff options
author | Stafford Horne <shorne@gmail.com> | 2019-07-21 20:58:54 +0000 |
---|---|---|
committer | Stafford Horne <shorne@gcc.gnu.org> | 2019-07-21 20:58:54 +0000 |
commit | 2e92185a033ec94d3dbaf22577110883db1474a1 (patch) | |
tree | fc6aa93cd23671359f287d9ce587e2737dba0552 /gcc/config.gcc | |
parent | 48df93911ab1b71a533934419c320fe9102b5ec1 (diff) | |
download | gcc-2e92185a033ec94d3dbaf22577110883db1474a1.zip gcc-2e92185a033ec94d3dbaf22577110883db1474a1.tar.gz gcc-2e92185a033ec94d3dbaf22577110883db1474a1.tar.bz2 |
or1k: Fix code quality for volatile memory loads
Volatile memory does not match the memory_operand predicate. This
causes extra extend/mask instructions instructions when reading
from volatile memory. On OpenRISC loading volatile memory can be
treated the same as regular memory loads which supports combined
sign/zero extends. Fixing this eliminates the need for extra
extend/mask instructions.
This also adds a test provided by Richard Selvaggi which uncovered the
issue while we were looking into another issue.
gcc/ChangeLog:
PR target/90363
* config/or1k/or1k.md (zero_extend<mode>si2): Update predicate.
(extend<mode>si2): Update predicate.
* gcc/config/or1k/predicates.md (volatile_mem_operand): New.
(reg_or_mem_operand): New.
gcc/testsuite/ChangeLog:
PR target/90363
* gcc.target/or1k/swap-1.c: New test.
* gcc.target/or1k/swap-2.c: New test.
From-SVN: r273647
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions