aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-range.cc
diff options
context:
space:
mode:
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>2023-08-21 15:25:08 +0530
committerPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>2023-08-21 15:25:08 +0530
commit649388462e9a3c2de0b90ce525de8044704cc521 (patch)
tree072b497d59ae16fb2b871e1f2f3ea11cb757d6ea /gcc/value-range.cc
parente10cb804e658dbd1e9d58f528f3985362e4e72e7 (diff)
downloadgcc-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