Hi Andre, On Thu, 28 Nov 2024 at 17:37, Andre Vieira <andre.simoesdiasvie...@arm.com> wrote: > > Hi, > > This rejects any loops where any predicated instruction comes before the vctp > that generates the loop predicate. Even though this is not a requirement for > dlstp transformation we have found potential issues where you can end up with > a > wrong transformation, so it is safer to reject such loops. > > OK for trunk? > > gcc/ChangeLog: > > * gcc/config/arm/arm.cc (arm_mve_get_loop_vctp): Reject loops with a > predicated instruction before the vctp. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/mve/dlstp-invalid-asm.c (test10): Renamed to... > (test10a): ... this. > (test10b): Variation of test10a with a small change to trigger an > issue.
Thanks, the patch LGTM except a minor nit: /* Using a VPR that gets re-generated within the loop. */ -void test10 (int32_t *a, int32_t *b, int32_t *c, int n) +void test10a (int32_t *a, int32_t *b, int32_t *c, int n) [...] +/* Using a VPR that gets re-generated within the loop. */ +void test10b (int32_t *a, int32_t *b, int32_t *c, int n) Can you update the comment before test10b, to highlight the difference with test10a? Thanks, Christophe > --- > gcc/config/arm/arm.cc | 21 ++++++++++++++----- > .../gcc.target/arm/mve/dlstp-invalid-asm.c | 20 +++++++++++++++++- > 2 files changed, 35 insertions(+), 6 deletions(-) >