Landing: 4182cf11e1e3

Project / Subsystem

gcc / aarch64

Date

2026-08-27

Author

Pengxuan Zheng

Commit

4182cf11e1e3d2ebcf4f5c3dff157f844a635bf8

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
aarch64
patch_id
—
commit_hash
4182cf11e1e3d2ebcf4f5c3dff157f844a635bf8
source_type
github
headline
AArch64 vector permute optimization uses REV64+EXT.
tldr
AArch64 vector permute patterns can now be optimized into REV64 and EXT instructions, improving performance.
author
Pengxuan Zheng
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • aarch64
  • • neon
  • • optimization
  • • vector
discussion_id_link
—
bugzilla_pr
—
date
2026-08-27T00:00:00.000Z

This commit introduces an optimization for the AArch64 architecture that recognizes specific vector permute patterns, such as those generated by __builtin_shuffle, and transforms them into a sequence of REV64 and EXT instructions. This new optimization can significantly improve performance by replacing a less efficient table-lookup (tbl) instruction with a more streamlined two-instruction sequence. The optimization is intelligently applied only when the pattern does not occur within a loop, preventing potential performance degradation in loop-heavy code.