[LLVMbugs] [Bug 1264] NEW: converting 64-bit constant pool entry to 32-bit not necessarily beneficial
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Mar 21 09:56:54 PDT 2007
http://llvm.org/bugs/show_bug.cgi?id=1264
Summary: converting 64-bit constant pool entry to 32-bit not
necessarily beneficial
Product: libraries
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Backend: X86
AssignedTo: unassignedbugs at nondot.org
ReportedBy: djg at cray.com
For this test case:
define double @foo(double %x) {
%y = mul double %x, 5.000000e-01
ret double %y
}
llc -march=x86-64 currently produces a 32-bit constant pool entry and this code:
cvtss2sd .LCPI1_0(%rip), %xmm1
mulsd %xmm1, %xmm0
instead of just using a 64-bit constant pool entry with this:
mulsd .LCPI1_0(%rip), %xmm0
This is due to the code in ExpandConstantFP in LegalizeDAG.cpp. It notices that
x86-64 indeed has an instruction to load a 32-bit float from memory and convert
it into a 64-bit float in a register, however it doesn't notice that this isn't
beneficial because it prevents the load from being folded into the multiply.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list