This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/64785] [5 Regression][SH] and|or|xor #imm not used
- From: "olegendo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 28 Jan 2015 17:06:59 +0000
- Subject: [Bug target/64785] [5 Regression][SH] and|or|xor #imm not used
- Auto-submitted: auto-generated
- References: <bug-64785-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64785
--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #1)
>
> Another more radical approach could be to insert an RTL pass that
> pre-allocates the R0 reg for those insns that have "z" constraint
> alternatives, similar to what Kaz did with the mov.{b|w} patterns in
> prepare_move_operands for LRA.
As a start, that pass could walk over all insns and make sure that for operands
with constraints/alternatives no hardregs are used before RA. For instance
(set (reg:SI 163) (and:SI (reg:SI 5 r5) (const_int 128)))
would be changed to
(set (reg:SI 164) (reg:SI r5)) // 164 is a new pseudo
(set (reg:SI 163) (and:SI (reg:SI 164) (const_int 128)))
I think something like this would be feasible for 5.0.