Landing: 465ee014cb0c

Project / Subsystem

gcc / gcc/middle-end

Date

2026-08-13

Author

Richard Biener

Commit

465ee014cb0cf9be62f0fd3de3821c755d37f58d

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc/middle-end
patch_id
—
commit_hash
465ee014cb0cf9be62f0fd3de3821c755d37f58d
source_type
github
headline
Improve vector conversion folding by handling NOP and sign conversions correctly.
tldr
Vector conversion optimizations now correctly handle no-operation and sign-preserving conversions.
author
Richard Biener
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • vectorization
  • • middle-end
  • • type conversion
discussion_id_link
—
bugzilla_pr
—
date
2026-08-13T00:00:00.000Z

This commit refines vector conversion optimizations by addressing issues in supportable_convert_operation and vectorizable_conversion. It ensures that no-operation (NOP) conversions and sign-preserving conversions are correctly handled, preventing test suite failures. The changes allow NOP_EXPR and VIEW_CONVERT_EXPR for same-mode types, and modify vectorizable_conversion to prefer VIEW_CONVERT_EXPR for vector types, ensuring that these conversions are recognized and optimized appropriately without introducing incorrect behavior.