Landing: b24418a22128
Project / Subsystem
gcc / gcc/aarch64
Date
2026-09-09
Author
Karl Meakin
Commit
b24418a22128668b21179dfcb73fa54ee3929ecf
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/aarch64
- patch_id
- —
- commit_hash
- b24418a22128668b21179dfcb73fa54ee3929ecf
- source_type
- github
- headline
- aarch64: Fold intrinsics even if result is unused.
- tldr
- GCC now folds aarch64 NEON intrinsics even when their results are unused, preventing incorrect code generation.
- author
- Karl Meakin
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • aarch64
- • optimization
- • intrinsics
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-09T00:00:00.000Z
GCC’s intrinsic folding logic for aarch64 NEON instructions previously skipped folding if the result was unused. This was based on an incorrect assumption that all intrinsics would have an expand implementation. This commit corrects the logic to compute and store the result in a variable, allowing later passes to discard it if truly unused. A new test case verifies this fix.