aarch64: Fix mismatched SVE predicate modes [PR94606]
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 15 Apr 2020 12:52:20 +0000 (13:52 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 16 Apr 2020 14:45:37 +0000 (15:45 +0100)
commit26bebf576ddcdcfb596f07e8c2896f17c48516e7
treedf9a410eb6390626a266647b79738e148bc82e3a
parentd7a65edb629a010f7ef907d457343abcb569fab7
aarch64: Fix mismatched SVE predicate modes [PR94606]

For this testcase we ended up generating the invalid rtl:

(insn 10 9 11 2 (set (reg:VNx16BI 105)
        (and:VNx16BI (xor:VNx16BI (reg:VNx8BI 103)
                (reg:VNx16BI 104))
            (reg:VNx16BI 104))) "/tmp/bar.c":9:12 -1
     (nil))

Fixed by taking the VNx16BI lowpart.  It's safe to do that here because
the gp (r104) masks out the extra odd-indexed bits.

2020-04-16  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR target/94606
* config/aarch64/aarch64.c (aarch64_expand_sve_const_pred_eor): Take
the VNx16BI lowpart of the recursively-generated constant.

gcc/testsuite/
PR target/94606
* gcc.dg/vect/pr94606.c: New test.
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr94606.c [new file with mode: 0644]