[Bug target/69810] PowerPC64: unrecognizable insn

dje at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 22 13:48:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69810

--- Comment #6 from David Edelsohn <dje at gcc dot gnu.org> ---
The bug definitely predated the EXTQI change.  It was introduced when Red Hat
added the splitters for non-cr0 compares.

EXTQI is used for plain zero_extendqi<mode>2 and extendqi<mode>2. 
zero_extendqihi2 and extendqihi2 clearly are needed and make sense, so
restricting EXTQI is overkill.

I could change only the _dot and _dot2 patterns, but

andi. %0,%1,0xff

and

extsb. %0,%1

do properly represent zero_extendqihi2 / extendqihi2, and calculate the
implicit compare correctly.  The only problem is the splitter because the
compare pattern requires at least SImode.

The way it's currently written, the single instruction uses an HImode
temporary, but the two instruction sequence would need an SImode temporary,
which GCC cannot represent.

One solution is limit the dot patterns to SImode.  I don't know if there is a
way to handle the cmphi.


More information about the Gcc-bugs mailing list