[LLVMbugs] [Bug 9592] New: Comparing floats with constant doubles promotes to float
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 30 13:29:04 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9592
Summary: Comparing floats with constant doubles promotes to
float
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
AssignedTo: unassignedbugs at nondot.org
ReportedBy: jmuizelaar at mozilla.com
CC: llvmbugs at cs.uiuc.edu
The following code:
float clamp_float(float a)
{
if (a > 1.)
return 1.;
else
return a;
}
compiles to:
cvtss2sd %xmm0, %xmm1
ucomisd .LCPI0_0(%rip), %xmm1
jbe .LBB0_2
# BB#1:
movss .LCPI0_1(%rip), %xmm0
.LBB0_2: # %entry
ret
GCC avoids the promotion to double.
--
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