]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR111754: Rework encoding of result for VEC_PERM_EXPR with constant input vectors.
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Mon, 27 Nov 2023 17:10:49 +0000 (22:40 +0530)
committerPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Mon, 27 Nov 2023 17:10:49 +0000 (22:40 +0530)
commit2065438db4ac13af7e0de2f934959413647f74a7
tree648e1d6d18b1a15a309416104fd48016edfe5f4d
parentc9d691a7daa162d6d20927e1e4bf214dad82c5be
PR111754: Rework encoding of result for VEC_PERM_EXPR with constant input vectors.

gcc/ChangeLog:
PR middle-end/111754
* fold-const.cc (fold_vec_perm_cst): Set result's encoding to sel's
encoding, and set res_nelts_per_pattern to 2 if sel contains stepped
sequence but input vectors do not.
(test_nunits_min_2): New test Case 8.
(test_nunits_min_4): New tests Case 8 and Case 9.

gcc/testsuite/ChangeLog:
PR middle-end/111754
* gcc.target/aarch64/sve/slp_3.c: Adjust code-gen.
* gcc.target/aarch64/sve/slp_4.c: Likewise.
* gcc.dg/vect/pr111754.c: New test.

Co-authored-by: Richard Sandiford <richard.sandiford@arm.com>
gcc/fold-const.cc
gcc/testsuite/gcc.dg/vect/pr111754.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/slp_3.c
gcc/testsuite/gcc.target/aarch64/sve/slp_4.c