https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98443
Bug ID: 98443 Summary: Failure to optimize out vector operations into a constant when possible Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: gabravier at gmail dot com Target Milestone: --- typedef char A __attribute__((vector_size(32))); int foo(A w) { w *= (A){0, 1}; return w[0]; } This can be optimized into `return 0;`. This transformation is done by LLVM, but not by GCC.