Support variable index vec_set.
authorliuhongt <hongtao.liu@intel.com>
Mon, 19 Oct 2020 08:04:39 +0000 (16:04 +0800)
committerliuhongt <hongtao.liu@intel.com>
Tue, 17 Nov 2020 03:29:46 +0000 (11:29 +0800)
commit287cc750b0887e86cb309d976b17c7ee95f7ad48
tree2b74f2bd1f6298cde8fb19861b048764c0067bad
parent3072125a40ccfc139a92d44fb3911a8a7186b025
Support variable index vec_set.

gcc/ChangeLog:

PR target/97194
* config/i386/i386-expand.c (ix86_expand_vector_set_var): New function.
* config/i386/i386-protos.h (ix86_expand_vector_set_var): New Decl.
* config/i386/predicates.md (vec_setm_operand): New predicate,
true for const_int_operand or register_operand under TARGET_AVX2.
* config/i386/sse.md (vec_set<mode>): Support both constant
and variable index vec_set.

gcc/testsuite/ChangeLog:

* gcc.target/i386/avx2-vec-set-1.c: New test.
* gcc.target/i386/avx2-vec-set-2.c: New test.
* gcc.target/i386/avx512bw-vec-set-1.c: New test.
* gcc.target/i386/avx512bw-vec-set-2.c: New test.
* gcc.target/i386/avx512f-vec-set-2.c: New test.
* gcc.target/i386/avx512vl-vec-set-2.c: New test.
gcc/config/i386/i386-expand.c
gcc/config/i386/i386-protos.h
gcc/config/i386/predicates.md
gcc/config/i386/sse.md
gcc/testsuite/gcc.target/i386/avx2-vec-set-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx2-vec-set-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512bw-vec-set-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512bw-vec-set-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512f-vec-set-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512vl-vec-set-2.c [new file with mode: 0644]