[Bug target/115749] Non optimal assembly for integer modulo by a constant on x86-64 CPUs
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 2 17:58:59 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115749
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |115755
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> The mulx issue can be reduced down to just:
> ```
> 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);
> }
>
> ```
>
> It only happens with constants it seems.
I split that out to PR 115755.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115755
[Bug 115755] mulx (with -mbmi2) does not show up with constant multiply
More information about the Gcc-bugs
mailing list