PR111648: Fix wrong code-gen due to incorrect VEC_PERM_EXPR folding.
commit3ec8ecb8e92faec889bc6f7aeac9ff59e82b4f7f
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Wed, 18 Oct 2023 18:59:38 +0000 (19 00:29 +0530)
committerPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Wed, 18 Oct 2023 18:59:38 +0000 (19 00:29 +0530)
tree48094d2889d1aeba590bb5b0ead6764a074cb093
parentfe9767eedcea3e867a48102f96d913fc70670e67
PR111648: Fix wrong code-gen due to incorrect VEC_PERM_EXPR folding.

gcc/ChangeLog:
PR tree-optimization/111648
* fold-const.cc (valid_mask_for_fold_vec_perm_cst_p): If a1
chooses base element from arg, ensure that it's a natural stepped
sequence.
(build_vec_cst_rand): New param natural_stepped and use it to
construct a naturally stepped sequence.
(test_nunits_min_2): Add new unit tests Case 6 and Case 7.
gcc/fold-const.cc