Skip to content
Snippets Groups Projects
Commit 32c69a56 authored by Roger Sayle's avatar Roger Sayle
Browse files

PR target/96558: Only call ix86_expand_clear with GENERAL_REGS.

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.

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.
parent 86f87414
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment