[Issue 21816] New: testing XMM for nan does not work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 10 07:40:16 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21816
Issue ID: 21816
Summary: testing XMM for nan does not work
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
The following fails the assert:
bool testf(float t) {
return cast(bool)t;
}
void test3918() {
assert(testf(float.nan));
}
int main() {
test3918();
return 0;
}
when compiling with -O for XMM. The generated code is:
xorps XMM1,XMM1
ucomiss XMM1,XMM0
jne LC
(*) jp LC
xor EAX,EAX
jmp short L11
LC: mov EAX,1
L11: ret
The (*) instruction is missing.
--
More information about the Digitalmars-d-bugs
mailing list