i386: Fix up *{add,sub}v<dwi>4_doubleword patterns (PR target/93412)
authorJakub Jelinek <jakub@redhat.com>
Sun, 26 Jan 2020 11:12:36 +0000 (12:12 +0100)
committerJakub Jelinek <jakub@redhat.com>
Sun, 26 Jan 2020 11:12:36 +0000 (12:12 +0100)
commita9947bac0799b0c91e21b7c612b80cd0b54016f0
tree6e78cfb1dfa00c7c036c513b8bf0d11ac3633a63
parent322db86f4b4df1261308e8a02e69018d9cea98e9
i386: Fix up *{add,sub}v<dwi>4_doubleword patterns (PR target/93412)

In the *{add,sub}v<dwi>4_doubleword patterns, we don't really want to see a
VOIDmode last operand, because it then means invalid RTL
(sign_extend:{TI,POI} (const_int ...)) or so, and therefore something we
don't really handle in the splitter either.  We have
*{add,sub}v<dwi>4_doubleword_1 pattern for those and that is what combine
will match, the problem in this testcase is just that it was only RA that
propagated the constant into the instruction.

In the similar *{add,sub}v<mode>4 patterns, we make sure not to accept
VOIDmode operand and similarly to these have _1 suffixed variant that allows
constants.

2020-01-26  Jakub Jelinek  <jakub@redhat.com>

PR target/93412
* config/i386/i386.md (*addv<dwi>4_doubleword, *subv<dwi>4_doubleword):
Use nonimmediate_operand instead of x86_64_hilo_general_operand and
drop <di> from constraint of last operand.

* gcc.dg/pr93412.c: New test.
gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr93412.c [new file with mode: 0644]