Landing: 085b7cf00c52

Project / Subsystem

gcc / aarch64

Date

2026-05-08

Author

Christopher Bazley

Commit

085b7cf00c5269f7e4e76b022faf00b7fc5ab16b

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
aarch64
patch_id
commit_hash
085b7cf00c5269f7e4e76b022faf00b7fc5ab16b
source_type
github
headline
AArch64 vectorization costs adjusted for scalar-to-vector conversion.
tldr
This change improves AArch64 code generation by more accurately costing scalar-to-vector conversions during vectorization, preventing inefficient code.
author
Christopher Bazley
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • aarch64
  • vectorization
  • cost model
  • optimization
discussion_id_link
bugzilla_pr
date
2026-05-08T00:00:00.000Z

This commit adjusts the cost model for AArch64 vectorization, specifically addressing scalar-to-vector conversions within vec_construct operations. Previously, the cost of transferring scalar values to SIMD registers was not accurately accounted for, leading to suboptimal vectorization decisions. The corrected cost prevents the compiler from generating inefficient vectorized code sequences in cases where scalar operations would be more performant. This addresses an anti-pattern observed with predicated tails enabled for basic block SLP vectorization.