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/67057] [SH] Use negc to calculate 1-T+const_int


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67057

--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #0)
> Combine is looking for a pattern:
> 
> Failed to match this instruction:
> (set (reg:SI 162 [ D.1652 ])
>     (plus:SI (zero_extract:SI (reg:SI 4 r4 [ a ])
>             (const_int 1 [0x1])
>             (const_int 25 [0x19]))
>         (const_int 4 [0x4])))
> 
> Which could be implemented with treg_set_expr.

In this case, the treg_set_expr should be only matched if it will expand into a
negating T bit store.  For that a new predicate "neg_treg_set_expr" should be
added.  sh_recog_treg_set_expr should get an additional parameter whether it
should match positive, negative or both forms.


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