[Bug tree-optimization/126721] New: UNIFORM_VECTOR_CST[a] -> uniform cst

"pinskia at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.