This is the mail archive of the
mailing list for the GCC project.
Re: PATCH RFC: My version of the lower-subreg patch
On Fri, Dec 29, 2006 at 08:47:13PM -0800, Ian Lance Taylor wrote:
> Rask Ingemann Lambertsen <firstname.lastname@example.org> writes:
> > So the change is rejected, which trips the assert. I solved it by
> > reordering the two movhi variants. Other targets might run into the same
> > issue.
> Interesting issue. I think most targets will handle this just by
> using alternatives, though I understand that won't work for you
> because of the additional CLOBBER.
The CLOBBER version is only meant for use by a peephole2 pattern. This is
the first time - that I know of - it has been matched by an earlier pass.
As it turns out, the i386 back end has similiar insn patterns in the same
order that I did:
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand:SI 1 "const0_operand" "i"))
(clobber (reg:CC FLAGS_REG))]
"reload_completed && ...
[(set (match_operand:SI 0 "nonimmediate_operand" "=...")
(match_operand:SI 1 "general_operand" "...")
"!(MEM_P (operands) && MEM_P (operands))"
But here, the CLOBBERS versions (at 32-bits, there's also one for -1) are
guarded by reload_completed and subreg passes run before reload.
Rask Ingemann Lambertsen