Landing: a7ba10ac1e02

Project / Subsystem

gcc / isel

Date

2026-07-29

Author

Jakub Jelinek

Commit

a7ba10ac1e027349a655ee4572abf34c1b9c1db1

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
isel
patch_id
—
commit_hash
a7ba10ac1e027349a655ee4572abf34c1b9c1db1
source_type
github
headline
Fix ICE on out of bounds vector element access.
tldr
Corrects a bug in vector element access handling that could lead to compiler internal errors.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • vectorization
  • • bugfix
discussion_id_link
—
bugzilla_pr
—
date
2026-07-29T00:00:00.000Z

The instruction selector (isel) pass in GCC could encounter an internal compiler error (ICE) when processing out-of-bounds vector element accesses. This was due to incorrect bounds checking logic that mishandled constant indices, particularly negative ones. The fix ensures correct handling of these cases by punting when indices don’t fit expected types and by using a more accurate comparison for bounds checks, preventing ICEs and ensuring correct code generation.