Kyrylo Tkachov <kyrylo.tkac...@arm.com> writes: > diff --git a/gcc/config/aarch64/falkor-tag-collision-avoidance.c > b/gcc/config/aarch64/falkor-tag-collision-avoidance.c > index 719df484ee61..4e07a43282f7 100644 > --- a/gcc/config/aarch64/falkor-tag-collision-avoidance.c > +++ b/gcc/config/aarch64/falkor-tag-collision-avoidance.c > @@ -538,9 +538,12 @@ valid_src_p (rtx src, rtx_insn *insn, struct loop *loop, > bool *pre_post, > if (!aarch64_classify_address (&addr, XEXP (x, 0), mode, true)) > return false; > > - unsigned regno = REGNO (addr.base); > - if (global_regs[regno] || fixed_regs[regno]) > - return false; > + if (REG_P (addr.base)) > + { > + unsigned regno = REGNO (addr.base); > + if (global_regs[regno] || fixed_regs[regno]) > + return false; > + } > > I think we want to just return false here if !REG_P (addr.base) rather than > fall through?
I think functionally would be equivalent cause after we guard on addr.type, but probably nicer. > +++ b/gcc/testsuite/gcc.target/aarch64/pr48240.c > @@ -0,0 +1,9 @@ > +/* { dg-do compile } */ > +/* { dg-options "-v -Os -mcpu=falkor -mpc-relative-literal-loads > -mcmodel=large" } */ > > We shouldn't need the "-v" here... Ack > Ok with those changes. > Thanks, > Kyrill Thanks for reviewing updating the patch! Andrea