public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/51837] New: Use of result from 64*64->128 bit multiply via __uint128_t not optimized
@ 2012-01-12 19:23 svfuerst at gmail dot com
2021-08-07 2:02 ` [Bug middle-end/51837] " pinskia at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: svfuerst at gmail dot com @ 2012-01-12 19:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51837
Bug #: 51837
Summary: Use of result from 64*64->128 bit multiply via
__uint128_t not optimized
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: svfuerst@gmail.com
unsigned long long foo(unsigned long long x, unsigned long long y)
{
__uint128_t z = (__uint128_t)x * y;
return z ^ (z >> 64);
}
Compiles into
mov %rsi, %rax
mul %rdi
mov %rax, %r9
mov %rdx, %rax
xor %r9, %rax
retq
The final two mov instructions are not needed, and the above is equivalent to
mov %rsi, %rax
mul %rdi
xor %rdx, %rax
retq
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/51837] Use of result from 64*64->128 bit multiply via __uint128_t not optimized
2012-01-12 19:23 [Bug middle-end/51837] New: Use of result from 64*64->128 bit multiply via __uint128_t not optimized svfuerst at gmail dot com
@ 2021-08-07 2:02 ` pinskia at gcc dot gnu.org
2021-08-07 2:06 ` [Bug target/51837] " pinskia at gcc dot gnu.org
2022-01-09 0:53 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-07 2:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51837
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Target Milestone|--- |6.0
Known to work| |6.1.0, 7.1.0, 9.4.0
Known to fail| |5.1.0, 5.5.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/51837] Use of result from 64*64->128 bit multiply via __uint128_t not optimized
2012-01-12 19:23 [Bug middle-end/51837] New: Use of result from 64*64->128 bit multiply via __uint128_t not optimized svfuerst at gmail dot com
2021-08-07 2:02 ` [Bug middle-end/51837] " pinskia at gcc dot gnu.org
@ 2021-08-07 2:06 ` pinskia at gcc dot gnu.org
2022-01-09 0:53 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-07 2:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51837
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |target
Target| |i?86-linux-gnu
Known to fail|5.1.0, 5.5.0 |
Known to work|6.1.0, 7.1.0, 9.4.0 |
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
GCC 6+ improved/fixed the __uint128_t case but the -m32 case for uint64_t is
still there.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/51837] Use of result from 64*64->128 bit multiply via __uint128_t not optimized
2012-01-12 19:23 [Bug middle-end/51837] New: Use of result from 64*64->128 bit multiply via __uint128_t not optimized svfuerst at gmail dot com
2021-08-07 2:02 ` [Bug middle-end/51837] " pinskia at gcc dot gnu.org
2021-08-07 2:06 ` [Bug target/51837] " pinskia at gcc dot gnu.org
@ 2022-01-09 0:53 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-09 0:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51837
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|6.0 |---
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-09 0:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-12 19:23 [Bug middle-end/51837] New: Use of result from 64*64->128 bit multiply via __uint128_t not optimized svfuerst at gmail dot com
2021-08-07 2:02 ` [Bug middle-end/51837] " pinskia at gcc dot gnu.org
2021-08-07 2:06 ` [Bug target/51837] " pinskia at gcc dot gnu.org
2022-01-09 0:53 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).