Landing: 0ac16fdbee15
Project / Subsystem
gcc / match.pd
Date
2026-07-07
Author
Pengfei Li
Commit
0ac16fdbee1509efe9cbdee89ae9fa7be9b87e78
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- match.pd
- patch_id
- —
- commit_hash
- 0ac16fdbee1509efe9cbdee89ae9fa7be9b87e78
- source_type
- github
- headline
- match.pd: Eliminate dead operand in vector permute and insert patterns
- tldr
- Optimizes vector permute and insert operations on AArch64 by avoiding unnecessary zero-vector materialization.
- author
- Pengfei Li
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • vector
- • aarch64
- • pattern matching
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-07T00:00:00.000Z
This commit optimizes vector permute and insert operations, particularly for AArch64, by eliminating a dead operand. When a vector is shifted and a new element is inserted, the previous GCC code generated an unnecessary zero vector. The new match.pd pattern detects when the permute’s result only depends on one source operand and replaces the unused operand with that source, avoiding the creation of a temporary zero vector and producing more efficient machine code.