Displaying 1 result from an estimated 1 matches for "gvalfp".
Did you mean:
gval
2014 Oct 07
4
[LLVMdev] Stange behavior in fp arithmetics on x86 (bug possibly)
...ers, thus any of my following assumptions maybe wrong. If
so, I will be grateful if you clarify me what's goes wrong. But if my
guesses are correct we possibly have a bug in fp arithmetics on x86.
I have the following ir:
@g = constant i64 1
define i32 @main() {
%gval = load i64* @g
%gvalfp = bitcast i64 %gval to double
%fmul = fmul double %gvalfp, -5.000000e-01
%fcmp = fcmp ueq double %fmul, -0.000000e+00
%ret = select i1 %fcmp, i32 1, i32 0
ret i32 %ret
}
And I expected that minimal positive denormalized double times -0.5 is equal
to -0.0, so correct exit code is 1.
l...