[PATCH] D143191: DAG: Handle inversion of fcSubnormal | fcZero
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 10:06:24 PST 2023
arsenm added inline comments.
================
Comment at: llvm/test/CodeGen/X86/is_fpclass.ll:894-901
+; CHECK-32-NEXT: flds {{[0-9]+}}(%esp)
+; CHECK-32-NEXT: fldz
+; CHECK-32-NEXT: fucompp
+; CHECK-32-NEXT: fnstsw %ax
+; CHECK-32-NEXT: # kill: def $ah killed $ah killed $ax
+; CHECK-32-NEXT: sahf
+; CHECK-32-NEXT: setp %cl
----------------
sepavloff wrote:
> arsenm wrote:
> > sepavloff wrote:
> > > This code looks incorrect. The argument is compared against 0.0 and the result is true if the comparison is unordered or not equal.
> > Looks like I broke the inverted case and ended up fixing it in one of my later patches
> Not sure if x87 has DAZ mode. Corresponding flag is in MXCSR only and it is not clear if MXCSR affects operations in x87. @jcranmer-intel, could you please clarify this point?
The attribute says codegen can assume this. If the hardware doesn't actually support the mode this is just undefined usage which doesn't matter
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143191/new/
https://reviews.llvm.org/D143191
More information about the llvm-commits
mailing list