Landing: a6173e867de7
Project / Subsystem
gcc / match.pd
Date
2026-08-18
Author
H.J. Lu
Commit
a6173e867de7f9e7a6f060e5a208a4290d19ba51
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- match.pd
- patch_id
- —
- commit_hash
- a6173e867de7f9e7a6f060e5a208a4290d19ba51
- source_type
- github
- headline
- match.pd: Improve MIN/MAX narrowing for vector types
- tldr
- Code generation for MIN/MAX operations on wide vector types is improved to handle conversions more effectively.
- author
- H.J. Lu
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • vectorization
- • x86
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-18T00:00:00.000Z
This change modifies the MIN/MAX narrowing in match.pd to use MIN/MAX followed by a convert operation. Previously, the narrowing was limited to single uses of the result, failing to support scenarios with explicit vector type conversions like converting between v2si and v2di. The new approach generates more efficient assembly by first performing the minmax on the wider type and then converting to the narrower type, resolving issues with PR middle-end/126906.