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: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs