Canonicalize vec_perm index to make the first index come from the first vector.
authorliuhongt <hongtao.liu@intel.com>
Tue, 18 Oct 2022 08:58:52 +0000 (16:58 +0800)
committerliuhongt <hongtao.liu@intel.com>
Wed, 19 Oct 2022 06:09:09 +0000 (14:09 +0800)
commit1442e2031e0bc2d0a5bf88ef3c92c5410e044bab
treecaea9f6fc394c360fb2888ac78817ecc5b21202a
parent21de009f741923bc2dcfaa80877b3725e90ab96c
Canonicalize vec_perm index to make the first index come from the first vector.

Fix unexpected non-canon form from gimple vector selector.

gcc/ChangeLog:

PR target/107271
* config/i386/i386-expand.cc (ix86_vec_perm_index_canon): New.
(expand_vec_perm_shufps_shufps): Call
ix86_vec_perm_index_canon

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr107271.c: New test.
gcc/config/i386/i386-expand.cc
gcc/testsuite/gcc.target/i386/pr107271.c [new file with mode: 0644]