[Bug target/103193] gcc for x86_64: wrong code generation: ucomiss instead of comiss

2021-11-11 Thread joseph at codesourcery dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103193 --- Comment #3 from joseph at codesourcery dot com --- Converting from >= to == is inappropriate (because >= should raise invalid for all NaN operands but == should do so only for signaling NaNs). If that's happening in architecture-independe

[Bug target/103193] gcc for x86_64: wrong code generation: ucomiss instead of comiss

2021-11-11 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103193 --- Comment #2 from Uroš Bizjak --- Here is compilable testcase: _Bool a (void) { #pragma STDC FENV_ACCESS ON float f; _Bool b; f = __builtin_nan (""); b = f >= f; // ucomiss (wrong), comiss (correct) return b; } Tree optimizers (_.o

[Bug target/103193] gcc for x86_64: wrong code generation: ucomiss instead of comiss

2021-11-11 Thread joseph at codesourcery dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103193 --- Comment #1 from joseph at codesourcery dot com --- See bug 52451 and bug 91323 for previous cases of unordered comparisons being wrongly used on x86.