Landing: 3268942a8b08

Project / Subsystem

gcc / aarch64

Date

2026-05-04

Author

Richard Sandiford

Commit

3268942a8b08ed15f7e09ad834cd9e87b56dbf6b

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
aarch64
patch_id
commit_hash
3268942a8b08ed15f7e09ad834cd9e87b56dbf6b
source_type
github
headline
AArch64: Fix SVE vec_perm for VL2048 VNx16QI.
tldr
Fixes an issue with SVE vector permutations for VL2048 that could lead to incorrect results due to truncation.
author
Richard Sandiford
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • aarch64
  • sve
  • vectorization
  • bugfix
  • arm
discussion_id_link
bugzilla_pr
date
2026-05-04T00:00:00.000Z

This commit addresses a correctness issue in the AArch64 SVE vec_perm instruction when used with VL2048 vectors. The vec_perm instruction has two expansions: one optimized for selectors that only refer to the first vector, and a general case using a SUB instruction. For VL2048, the SUB instruction can be truncated, leading to incorrect results when the selector should only pick from the first vector. This commit ensures the optimized expansion is used in this specific case, fixing the bug.