https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115755
Bug ID: 115755 Summary: mulx (with -mbmi2) does not show up with constant multiply Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Target: x86_64-linux-gnu Take: ``` unsigned long func(unsigned long x) { __uint128_t t = x; return (t * 123)>>64; } __uint128_t func1(unsigned long x, unsigned long y) { __uint128_t t = x; return (t * 123); } __uint128_t func2(unsigned long x, unsigned long y) { __uint128_t t = x; return (t * y); } ``` func2 does use mulx but func and func1 does not.