https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118481
Bug ID: 118481 Summary: missed removing of an if at the gimple level Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: missed-optimization, TREE Severity: normal Priority: P3 Component: tree-optimization Assignee: pinskia at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take: ``` typedef unsigned char v1 __attribute__((__vector_size__(1))); void f(void*); v1 vext_p64(v1 a, v1 b, unsigned n) { v1 r = a; r[0] = (n == 0) ? a[n] : a[0]; f(&a); return r; } ``` We should be able to remove the if statement at the gimple level but currently does not. Note this testcase ICEs in GCC 14 (see PR 118476).