aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2021-12-01 14:36:24 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2021-12-01 14:36:24 +0000
commit1e625a44f6f3001cea31e0f7c563943ecba92b68 (patch)
tree9fd6ab7ed2f867a05735a833d8668ecb4d4556ab /gcc/fold-const.c
parentcb137e85720654e41db370d952df226654e576a6 (diff)
downloadgcc-1e625a44f6f3001cea31e0f7c563943ecba92b68.zip
gcc-1e625a44f6f3001cea31e0f7c563943ecba92b68.tar.gz
gcc-1e625a44f6f3001cea31e0f7c563943ecba92b68.tar.bz2
vect: Tighten check for SLP memory groups [PR103517]
When checking for compatible stmts, vect_build_slp_tree_1 did: && !(STMT_VINFO_GROUPED_ACCESS (stmt_info) && (first_stmt_code == ARRAY_REF || first_stmt_code == BIT_FIELD_REF || first_stmt_code == INDIRECT_REF || first_stmt_code == COMPONENT_REF || first_stmt_code == MEM_REF))) That is, it allowed any rhs_code as long as the first_stmt_code looked valid. This had the effect of allowing IFN_MASK_LOAD to be paired with an earlier non-call code (but didn't allow the reverse). This patch makes the check symmetrical. gcc/ PR tree-optimization/103517 * tree-vect-slp.c (vect_build_slp_tree_1): When allowing two different component references, check the codes of both them, rather than just the first. gcc/testsuite/ PR tree-optimization/103517 * gcc.dg/vect/pr103517.c: New test.
Diffstat (limited to 'gcc/fold-const.c')
0 files changed, 0 insertions, 0 deletions