[PATCH] Fix ubsan i?86 {add,sub,mul}v<mode>4 patterns
Uros Bizjak
ubizjak@gmail.com
Tue Mar 25 20:17:00 GMT 2014
On Tue, Mar 25, 2014 at 8:18 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> 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.
The patch is OK for mainline.
Thanks,
Uros.
More information about the Gcc-patches
mailing list