This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ubsan i?86 {add,sub,mul}v<mode>4 patterns
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Richard Sandiford <rdsandiford at googlemail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 25 Mar 2014 20:18:53 +0100
- Subject: Re: [PATCH] Fix ubsan i?86 {add,sub,mul}v<mode>4 patterns
- Authentication-results: sourceware.org; auth=none
- References: <20140325072432 dot GK1817 at tucnak dot redhat dot com> <CAFULd4Z7wtT+ZvT8ka-WG=DrHH_jbqa6gYzi5nZddL-UdrE4KA at mail dot gmail dot com> <20140325101734 dot GQ1817 at tucnak dot redhat dot com> <CAFULd4bMa71vkokzq9ZP9UApOK-7mNq2z_pfikAxg93vLcPaSQ at mail dot gmail dot com> <20140325150640 dot GS1817 at tucnak dot redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Mar 25, 2014 at 04:06:40PM +0100, Jakub Jelinek wrote:
> On Tue, Mar 25, 2014 at 12:39:18PM +0100, Uros Bizjak wrote:
> > The patch is OK in principle, but we could follow established practice
> > and use separate predicates - please see general_szext_operand mode
> > attribute definition.
>
> So like this? I've tried to use non-VOIDmode of the predicates that were
> used previously (i.e. general_operand or x86_64_general_operand).
>
> 2014-03-25 Jakub Jelinek <jakub@redhat.com>
>
> * config/i386/i386.md (general_sext_operand): New mode attr.
> (addv<mode>4, subv<mode>4, mulv<mode>4): If operands[2] is CONST_INT,
> don't generate (sign_extend (const_int)).
> (*addv<mode>4, *subv<mode>4, *mulv<mode>4): Disallow CONST_INT_P
> operands[2]. Use We constraint instead of <i> and <general_sext_operand>
> predicate instead of <general_operand>.
> (*addv<mode>4_1, *subv<mode>4_1, *mulv<mode>4_1): New insns.
> * config/i386/constraints.md (We): New constraint.
> * config/i386/predicates.md (x86_64_sext_operand,
> sext_operand): New predicates.
Now successfully bootstrapped/regtested on x86_64-linux and i686-linux.
Jakub
- References:
- [PATCH] Fix ubsan i?86 {add,sub,mul}v<mode>4 patterns
- Re: [PATCH] Fix ubsan i?86 {add,sub,mul}v<mode>4 patterns
- Re: [PATCH] Fix ubsan i?86 {add,sub,mul}v<mode>4 patterns
- Re: [PATCH] Fix ubsan i?86 {add,sub,mul}v<mode>4 patterns
- Re: [PATCH] Fix ubsan i?86 {add,sub,mul}v<mode>4 patterns