https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91323
Bug ID: 91323 Summary: LTGT rtx produces UCOMISS instead of COMISS Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: iii at linux dot ibm.com Target Milestone: --- I'm implementing signaling comparisons on S/390 and I'm trying to figure out whether or not LTGT is supposed to be signaling. I've decided to check what Intel does, and ran into what appears to be a bug. Consider the following functions: int f1(float a, float b) { return a < b || a > b; } int f2(float a, float b) { return __builtin_isless(a, b) || __builtin_isgreater(a, b); } int f3(float a, float b) { return __builtin_islessgreater(a, b); } gcc creates LTGT rtx for f1 and UNEQ for f2 and f3. However, for all 3 variants it then emits UCOMISS instruction. I would expect f1 to be compiled to COMISS, since I believe that comparison operators in C are supposed to be signaling.