> On 1 Jul 2025, at 18:37, Alex Coplan <alex.cop...@arm.com> wrote:
> 
> The "else operand" to maskload should always be a const_vector, never a
> const_int.
> 
> This was just an issue I noticed while looking through the code, I don't
> have a testcase which shows a concrete problem due to this.
> 
> Testing of that change alone showed ICEs with load lanes vectorization
> and SVE.  That turned out to be because the backend pattern was missing
> a mode for the else operand (causing the middle-end to choose a
> const_int during expansion), fixed thusly.  That in turn exposed an
> issue with the unpredicated load lanes expander which was using the
> wrong mode for the else operand, so fixed that too.
> 
> Bootstrapped/tested on aarch64-linux-gnu, OK for trunk?
> 

Ok.
Thanks,
Kyrill

> Thanks,
> Alex
> 
> gcc/ChangeLog:
> 
> * config/aarch64/aarch64-sve.md
> (vec_load_lanes<mode><vsingle>): Expand else operand in
> subvector mode, as per optab documentation.
> (vec_mask_load_lanes<mode><vsingle>): Add missing mode for
> operand 3.
> * config/aarch64/predicates.md (aarch64_maskload_else_operand):
> Remove const_int.
> ---
> gcc/config/aarch64/aarch64-sve.md | 4 ++--
> gcc/config/aarch64/predicates.md  | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
> 
> <0002-aarch64-Drop-const_int-from-aarch64_maskload_else_op.patch>

Reply via email to