Sat Jan 2 20:50:00 GMT 1999
Jeffrey A Law writes:
> I believe the problem is the unroller is creating non-canonical rtl. In
> particular note from the .loop dump:
> (jump_insn 107 105 109 (set (pc)
> (if_then_else (ge (const_int 0)
> (reg/v:SI 96))
> (label_ref 136)
> (pc))) -1 (nil)
> The constant is supposed to appear as the second source operand to the
> compare. I suspect you probably need reverse the args and the comparison.
> It may be the case that we're now unrolling a class of loops that we did not
> before and as a result we're getting this non-canonical rtl.
No, this does not appear to be the case. I wonder why we haven't
tripped over this ages ago?
The problem is that emit_cmp_insn is being called with a constant as
the first operand and a register as the second operand. I'll generate
a patch to avoid this case.
I suppose emit_cmp_insn should abort for this case. Interestingly,
if the pa MD disallowed this operand combination, then emit_cmp_insn
would have forced the constant into a register.
More information about the Gcc-bugs