[LLVMbugs] [Bug 9127] New: Load not being folded
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Feb 2 13:04:41 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9127
Summary: Load not being folded
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
AssignedTo: unassignedbugs at nondot.org
ReportedBy: rafael.espindola at gmail.com
CC: llvmbugs at cs.uiuc.edu
Given
-------------
extern double sin( double );
typedef double (*UnaryFunType)(double);
struct Entry {
double in;
double out;
};
double foobar(double d, struct Entry *x) {
if (d == x->in)
return x->out;
return d;
}
--------------
gcc will produce
ucomisd (%rdi), %xmm0
jne L2
jp L2
movsd 8(%rdi), %xmm0
rep ; ret
llvm produces
movsd (%rdi), %xmm1
ucomisd %xmm0, %xmm1
jne LBB0_2
jp LBB0_2
movsd 8(%rdi), %xmm0
ret
Note that gcc folded the load into ucomisd.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list