[llvm-bugs] [Bug 48979] New: Failure to optimize some 64-bit constants in -Oz
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jan 31 21:09:17 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=48979
Bug ID: 48979
Summary: Failure to optimize some 64-bit constants in -Oz
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: gabravier at gmail.com
CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
llvm-dev at redking.me.uk, pengfei.wang at intel.com,
spatel+llvm at rotateright.com
int64_t f()
{
return 0x1234567800000000;
}
With -Os, GCC emits this:
f():
mov eax, 38177487
sal rax, 35
ret
Clang -Oz emits this:
f():
movabs rax, 1311768464867721216
ret
GCC saves 1 byte over LLVM here.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210201/1a3b9bcc/attachment.html>
More information about the llvm-bugs
mailing list