]> git.ipfire.org Git - thirdparty/gcc.git/commit
ifcvt: Don't lower bitfields with non-constant offsets [PR 111882]
authorAndre Vieira <andre.simoesdiasvieira@arm.com>
Fri, 20 Oct 2023 16:02:32 +0000 (17:02 +0100)
committerRichard Ball <richard.ball@arm.com>
Fri, 3 May 2024 10:09:58 +0000 (11:09 +0100)
commit4950f6bcd3cce9deb630b76af42cd6d6968ba03f
tree8d1d1a5bdb21b956d223dc9c2f61920b48f5627e
parent169f10cb7188774ffb33abac334c166e39300339
ifcvt: Don't lower bitfields with non-constant offsets [PR 111882]

This patch stops lowering of bitfields by ifcvt when they have non-constant
offsets as we are not likely to be able to do anything useful with those during
vectorization.  That also fixes the issue reported in PR 111882, which was
being caused by an offset with a side-effect being lowered, but constants have
no side-effects so we will no longer run into that problem.

gcc/ChangeLog:

PR tree-optimization/111882
* tree-if-conv.cc (get_bitfield_rep): Return NULL_TREE for bitfields
with non-constant offsets.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/pr111882.c: New test.

(cherry picked from commit 24cf1f600b8ad34c68a51f48884e72d01f729893)
gcc/testsuite/gcc.dg/vect/pr111882.c [new file with mode: 0644]
gcc/tree-if-conv.cc