Landing: 75b259d068e1

Project / Subsystem

gcc / aarch64

Date

2026-08-18

Author

Kyrylo Tkachov

Commit

75b259d068e1db2c8ac2246e3118dd5d24724674

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
aarch64
patch_id
—
commit_hash
75b259d068e1db2c8ac2246e3118dd5d24724674
source_type
github
headline
aarch64: Fix vec_perm operand zeroness flags when swapping
tldr
Correctly swaps zeroness flags along with operands in vec_perm expansion for aarch64.
author
Kyrylo Tkachov
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • aarch64
  • • vector
  • • compiler
  • • optimization
discussion_id_link
—
bugzilla_pr
—
date
2026-08-18T00:00:00.000Z

The aarch64_expand_vec_perm_const_1 function normalizes vector permutations by rotating indices and swapping operands. However, it incorrectly left the zero_op0_p and zero_op1_p flags pointing to the original operands’ zeroness status. This caused subsequent recognizers to read the wrong vector, leading to incorrect results, such as zero vectors being returned when they shouldn’t be. The fix ensures these flags are swapped along with the operands, resolving PR126597.