[PATCH] D143180: DAG: Expand legalization of is.fpclass to fcmp for DAZ
Serge Pavlov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 21 09:38:50 PDT 2023
sepavloff accepted this revision.
sepavloff added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:8107-8108
+ if (isFCmpEqualZero(Test, Semantics, DAG.getMachineFunction())) {
+ // If denormals could be implicitly treated as 0, this is not equivalent
+ // to a compare with 0 since it will also be true for denormals.
+ return DAG.getSetCC(DL, ResultVT, Op,
----------------
It looks like this comment is misplaced.
================
Comment at: llvm/unittests/ADT/FloatingPointMode.cpp:222-228
+
+TEST(FloatingPointModeTest, DenormalModePredicates) {
+ EXPECT_TRUE(DenormalMode::getPreserveSign().inputsAreZero());
+ EXPECT_TRUE(DenormalMode::getPositiveZero().inputsAreZero());
+ EXPECT_FALSE(DenormalMode::getIEEE().inputsAreZero());
+ EXPECT_FALSE(DenormalMode::getDynamic().inputsAreZero());
+}
----------------
This test is not related to the legalization, it could be committed separately.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143180/new/
https://reviews.llvm.org/D143180
More information about the llvm-commits
mailing list