Landing: 40c2f0369cc1

Project / Subsystem

gcc / aarch64

Date

2026-08-03

Author

Kyrylo Tkachov

Commit

40c2f0369cc19251696b882ea41381b2c35708cd

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
aarch64
patch_id
—
commit_hash
40c2f0369cc19251696b882ea41381b2c35708cd
source_type
github
headline
aarch64: name the saturating narrow patterns after the sstrunc and ustrunc optabs
tldr
Improves vectorization of saturating narrowing operations on AArch64 by correctly naming patterns.
author
Kyrylo Tkachov
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • aarch64
  • • vectorization
  • • optimization
discussion_id_link
—
bugzilla_pr
—
date
2026-08-03T00:00:00.000Z

Vectorization of saturating narrowing operations on AArch64 has been improved by correctly naming the relevant patterns. Previously, the backend lacked the necessary sstrunc or ustrunc optabs, causing saturating narrowing loops to be vectorized inefficiently using clamps and permutes. This commit adds the expander and ensures the patterns match correctly, reducing the instruction count for such operations.