https://bugs.llvm.org/show_bug.cgi?id=45305
Bug ID: 45305
Summary: fold away float to double promotion in signbit
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Keywords: code-quality
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedb...@nondot.org
Reporter: nok.ra...@gmail.com
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, spatel+l...@rotateright.com
#include <cmath>
bool foo(float x) {
return std::signbit(double(x));
}
bool bar(float x) {
return std::signbit(x);
}
define dso_local zeroext i1 @_Z3foof(float %0) local_unnamed_addr #0 {
%2 = fpext float %0 to double
%3 = bitcast double %2 to i64
%4 = icmp slt i64 %3, 0
ret i1 %4
}
define dso_local zeroext i1 @_Z3barf(float %0) local_unnamed_addr #0 {
%2 = bitcast float %0 to i32
%3 = icmp slt i32 %2, 0
ret i1 %3
}
foo(float):
cvtss2sd xmm0, xmm0
movmskpd eax, xmm0
and eax, 1
ret
bar(float):
movmskps eax, xmm0
and eax, 1
ret
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs