[Committed] PR target/96558: Only call ix86_expand_clear with GENERAL_REGS.

Roger Sayle roger@nextmovesoftware.com
Wed Aug 12 21:39:41 GMT 2020


The following patch tightens the predicates of the peephole2 from my recent
"Integer min/max improvements patch" to only hoist clearing a register when
that register is a general register.  Calling ix86_expand_clear with regs
other than GENERAL_REGS is not supported.

The following patch has been tested on x86_64-pc-linux-gnu with a
"make bootstrap" and "make -k check" with no new failures, and fixes
the new test case.  Committed as obvious to fix the immediate regression.
An additional patch (for a supplementary fix) is in preparation.

2020-08-12  Roger Sayle  <roger@nextmovesoftware.com>
	    Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog
	PR target/96558
	* config/i386/i386.md (peephole2): Only reorder register clearing
	instructions to allow use of xor for general registers.

gcc/testsuite/ChangeLog
	PR target/96558
	* gcc.dg/pr96558.c: New test.


Sorry for the breakage.
Roger
--
Roger Sayle
NextMove Software
Cambridge, UK

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patchr.txt
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200812/b63fc5b4/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patchrb.txt
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200812/b63fc5b4/attachment-0001.txt>


More information about the Gcc-patches mailing list