https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107920
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> (In reply to Andrew Pinski from comment #2)
> > It is specifically svld1rq_s8 folding into:
> > # VUSE <.MEM>
> > _5 = MEM <vector(16) signed char> [(signed char * {ref-all})x_3(D)];
> >
> >
> > Which is done by svld1rq_impl::fold (aarch64-sve-builtins-base.cc:1214).
>
> Which was added by r13-1055-g494bec025002df .
>
> The question becomes is gimple folding allowed to add MEM references here or
> not?
Yes, but the folding needs to properly handle virtual operands. Instead it
does
- # VUSE <.MEM_2(D)>
- _4 = svld1rq_s8 (_1, x_3(D));
+ # VUSE <.MEM>
+ _5 = MEM <vector(16) signed char> [(signed char * {ref-all})x_3(D)];
+ _4 = VEC_PERM_EXPR <_5, _5, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, ... }>;
see how gimple-fold.cc handles them.