Split edge fails when performed on a doloop jump on x86 port
Jim Wilson
wilson@specifixinc.com
Wed Feb 18 20:05:00 GMT 2004
Mostafa Hagog wrote:
> (set (pc)
> (if_then_else (ne (reg:SI 0 ax)
> (const_int 1 [0x1]))
> (label_ref 419)
> (pc)))
> (set (mem:SI (plus:SI (reg/f:SI 7 sp)
> (const_int 4 [0x4])) [12 S4 A8])
> (plus:SI (reg:SI 0 ax)
> (const_int -1 [0xffffffff])))
> (clobber (reg:SI 0 ax))
> (clobber (reg:CC 17 flags))
>
> doloop_end_internal pattern (from i386.md ) doesn't match this jump because
> of the (clobber (reg:SI 0 ax)) which is as a result of reload (I suppose).
I don't see a problem with the clobber. A hard register will match a
match_scratch.
I believe the problem is that operand 2 is a MEM, but the pattern uses
register_operand. There is an inconsistency in the pattern here, the
cosntraints allow operands that the predicates don't.
(match_operand:SI 2 "register_operand" "=1,1,*m*r")
The MEM matches the 'm' constraint, but not the register operand
predicate. This is not good. The pattern should use
nonimmediate_operand here instead of register_operand.
For optimization purposes, we perhaps want to add a condition that
rejects a MEM before reload. Maybe something like
"reload_in_progress || reload_completed
|| register_operand (operands[2], SImode)"
We want to do something like this because the MEM case results in less
efficient code than the REG case.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list