Landing: ca2920882be0
Project / Subsystem
gcc / match.pd
Date
2026-05-14
Author
Abhishek Kaushik
Commit
ca2920882be034bbe5a487f06792fbbc15dbc246
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- match.pd
- patch_id
- —
- commit_hash
- ca2920882be034bbe5a487f06792fbbc15dbc246
- source_type
- github
- headline
- Match.pd: Allow FNMA fold through conversions.
- tldr
- GCC can now fold FMA operations into FNMA even when type conversions are present, improving AArch64 SVE code generation.
- author
- Abhishek Kaushik
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • fma
- • fnma
- • aarch64
- • sve
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-14T00:00:00.000Z
GCC’s pattern matching for FMA (fused multiply-add) operations can now handle type conversions, enabling the generation of FNMA (fused multiply-negate-add) instructions on AArch64 SVE. Previously, FMA folds in match.pd only matched direct negations, preventing optimizations when the negated operand was wrapped in a type conversion. This change allows the compiler to recognize the subtraction-of-product form even with vector element type casts, leading to more efficient code generation on AArch64 SVE by selecting msb/mls instructions instead of separate neg and mla/mad instructions.