diff options
author | Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> | 2023-08-21 15:25:08 +0530 |
---|---|---|
committer | Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> | 2023-08-21 15:25:08 +0530 |
commit | 649388462e9a3c2de0b90ce525de8044704cc521 (patch) | |
tree | 072b497d59ae16fb2b871e1f2f3ea11cb757d6ea /gcc/value-range.cc | |
parent | e10cb804e658dbd1e9d58f528f3985362e4e72e7 (diff) | |
download | gcc-649388462e9a3c2de0b90ce525de8044704cc521.zip gcc-649388462e9a3c2de0b90ce525de8044704cc521.tar.gz gcc-649388462e9a3c2de0b90ce525de8044704cc521.tar.bz2 |
PR111048: Set arg_npatterns correctly.
In valid_mask_for_fold_vec_perm_cst we set arg_npatterns always
to VECTOR_CST_NPATTERNS (arg0) because of (q1 & 0) == 0:
/* Ensure that the stepped sequence always selects from the same
input pattern. */
unsigned arg_npatterns
= ((q1 & 0) == 0) ? VECTOR_CST_NPATTERNS (arg0)
: VECTOR_CST_NPATTERNS (arg1);
resulting in wrong code-gen issues.
The patch fixes this by changing the condition to (q1 & 1) == 0.
gcc/ChangeLog:
PR tree-optimization/111048
* fold-const.cc (valid_mask_for_fold_vec_perm_cst_p): Set arg_npatterns
correctly.
(fold_vec_perm_cst): Remove workaround and again call
valid_mask_fold_vec_perm_cst_p for both VLS and VLA vectors.
(test_fold_vec_perm_cst::test_nunits_min_4): Add test-case.
Diffstat (limited to 'gcc/value-range.cc')
0 files changed, 0 insertions, 0 deletions