[PATCH] D143191: DAG: Handle inversion of fcSubnormal | fcZero
Serge Pavlov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 6 10:13:33 PST 2023
sepavloff added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/CodeGenCommonISel.h:223-224
+/// (i.e. fewer instructions should be required to lower it). An example is the
+/// test "inf|normal|subnormal|zero", which is an inversion of "nan". \param
+/// Test The test as specified in 'is_fpclass' intrinsic invocation. \returns
+/// The inverted test, or fcNone, if inversion does not produce a simpler test.
----------------
Doxygen comments must be on separate lines.
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:7333
// TODO: Try getInvertedFPClassTest
+ bool IsInverted = false;
----------------
This variable seems unused. It is possible to remove it?
================
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
----------------
This code looks incorrect. The argument is compared against 0.0 and the result is true if the comparison is unordered or not equal.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143191/new/
https://reviews.llvm.org/D143191
More information about the llvm-commits
mailing list