r273647 - in /trunk/gcc: ChangeLog config/or1k/...

shorne@gcc.gnu.org shorne@gcc.gnu.org
Sun Jul 21 20:58:00 GMT 2019


Author: shorne
Date: Sun Jul 21 20:58:54 2019
New Revision: 273647

URL: https://gcc.gnu.org/viewcvs?rev=273647&root=gcc&view=rev
Log:
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.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/or1k/or1k.md
    trunk/gcc/config/or1k/predicates.md
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list