https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126721
Bug ID: 126721
Summary: UNIFORM_VECTOR_CST[a] -> uniform cst
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Take:
```
typedef uint16_t v2u16 __attribute__((vector_size(4)));
int f(int a)
{
v2u16 bc16={};
return bc16[a];
}
```
This should just return `0` as bc16 is an uniform vector cst and the values are
all zero. I Noticed this from PR 126720.