https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111732
Bug ID: 111732 Summary: genmatch missed optimization Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- For (for coss (BUILT_IN_COS BUILT_IN_COSF BUILT_IN_COSL) (for sins (BUILT_IN_SIN BUILT_IN_SINF BUILT_IN_SINL) (simplify (abs (sins (coss @0))) @0))) the cross product could be code generated more efficiently when we'd delay for substitution but we don't, because it's only implemented for (match ...) and not (simplify ...). Specifically handling ordering correctly is tricky (match is unordered). My original idea was to delay for lowering to decision tree insertion time (split upon a "conflict" with another pattern).