Displaying 2 results from an estimated 2 matches for "llvm_fcmp_uno".
2007 Oct 19
2
[LLVMdev] llvm_fcmp_ord and llvm_fcmp_uno and assembly code generation
Hi,
The C backend in llc generates code like:
static inline int llvm_fcmp_ord(double X, double Y) { return X == X && Y == Y; }
static inline int llvm_fcmp_uno(double X, double Y) { return X != X || Y != Y; }
First of all it generates a warning by clang and gcc (with certain flags):
x.cbe.c:130: warning: comparing floating point with == or != is unsafe
Now, C99 provides a macro for this kind of stuff, but unfortunately
ANSI C doesn't have something...
2007 Oct 22
0
[LLVMdev] llvm_fcmp_ord and llvm_fcmp_uno and assembly code generation
Hi,
Can you file a bugzilla on this? Thanks!
Evan
On Oct 19, 2007, at 3:50 AM, Török Edvin wrote:
> Hi,
>
> The C backend in llc generates code like:
> static inline int llvm_fcmp_ord(double X, double Y) { return X == X
> && Y == Y; }
> static inline int llvm_fcmp_uno(double X, double Y) { return X != X
> || Y != Y; }
>
> First of all it generates a warning by clang and gcc (with certain
> flags):
> x.cbe.c:130: warning: comparing floating point with == or != is unsafe
>
> Now, C99 provides a macro for this kind of stuff, but unfortunate...