This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/67057] [SH] Use negc to calculate 1-T+const_int
- 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, 29 Jul 2015 14:53:06 +0000
- Subject: [Bug target/67057] [SH] Use negc to calculate 1-T+const_int
- Auto-submitted: auto-generated
- References: <bug-67057-4 at http dot gcc dot gnu dot org/bugzilla/>
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.