diff options
author | Tamar Christina <tamar.christina@arm.com> | 2023-10-20 08:09:45 +0100 |
---|---|---|
committer | Tamar Christina <tamar.christina@arm.com> | 2023-10-20 08:09:45 +0100 |
commit | 88c27070c253094fb7e366583fbe09cec2371e8b (patch) | |
tree | 65ec1367890d608e2b72aa29f56f04cb6cc4d8e1 /gcc/config | |
parent | dd3e6f52e406a0bab787aebcb384ef6e2cf7a1e8 (diff) | |
download | gcc-88c27070c253094fb7e366583fbe09cec2371e8b.zip gcc-88c27070c253094fb7e366583fbe09cec2371e8b.tar.gz gcc-88c27070c253094fb7e366583fbe09cec2371e8b.tar.bz2 |
ifcvt: Support bitfield lowering of multiple-exit loops
With the patch enabling the vectorization of early-breaks, we'd like to allow
bitfield lowering in such loops, which requires the relaxation of allowing
multiple exits when doing so. In order to avoid a similar issue to PR107275,
the code that rejects loops with certain types of gimple_stmts was hoisted from
'if_convertible_loop_p_1' to 'get_loop_body_in_if_conv_order', to avoid trying
to lower bitfields in loops we are not going to vectorize anyway.
This also ensures 'ifcvt_local_dec' doesn't accidentally remove statements it
shouldn't as it will never come across them. I made sure to add a comment to
make clear that there is a direct connection between the two and if we were to
enable vectorization of any other gimple statement we should make sure both
handle it.
gcc/ChangeLog:
* tree-if-conv.cc (if_convertible_loop_p_1): Move check from here ...
(get_loop_body_if_conv_order): ... to here.
(if_convertible_loop_p): Remove single_exit check.
(tree_if_conversion): Move single_exit check to if-conversion part and
support multiple exits.
gcc/testsuite/ChangeLog:
* gcc.dg/vect/vect-bitfield-read-1-not.c: New test.
* gcc.dg/vect/vect-bitfield-read-2-not.c: New test.
* gcc.dg/vect/vect-bitfield-read-8.c: New test.
* gcc.dg/vect/vect-bitfield-read-9.c: New test.
Co-Authored-By: Andre Vieira <andre.simoesdiasvieira@arm.com>
Diffstat (limited to 'gcc/config')
0 files changed, 0 insertions, 0 deletions