This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/64785] [5 Regression][SH] and|or|xor #imm not used


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]