https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98602
Bug ID: 98602 Summary: Failure to optimise vector “x > -100 ? x : -100” to MAX_EXPR Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rsandifo at gcc dot gnu.org Target Milestone: --- We don't fold: typedef int v4si __attribute__ ((vector_size(16))); v4si f (v4si x) { return x > -100 ? x : -100; } to a MAX_EXPR, even though we do if -100 is replaced with a nonnegative constant or a variable. This may be related to the remaining part of PR95906.