This patch fixes PR 71407 by ensuring the BIT_FIELD_REF is created using the given vectype and then casted to the result type.
Tested on x86 and aarch64. Note that the test vectorizes on x86 but does not vectorize on aarch64 or power (due to a != statement failing to vectorize) Ok to commit? gcc/ PR tree-optimization/71407 PR tree-optimization/71416 * tree-vect-loop.c (vectorizable_live_operation): Use vectype for BIT_FIELD_REF type. Testsuite/ PR tree-optimization/71407 PR tree-optimization/71416 * gcc.dg/vect/pr71407.c: New * gcc.dg/vect/pr71416-1.c: New * gcc.dg/vect/pr71416-2.c: New Alan.
pr71407.patch
Description: Binary data