[PATCH] D152957: ValueTracking: Fix nan result handling for fmul
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 06:09:28 PDT 2023
foad accepted this revision.
foad added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4785
+ if (!F)
+ break;
+
----------------
Would it be worth changing isKnownNeverLogicalZero to take a `Function *` and handle the nullptr case conservatively?
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4787-4792
+ if ((KnownRHS.isKnownNeverInfinity() &&
+ KnownRHS.isKnownNeverLogicalZero(*F, Op->getType())) ||
+ (KnownLHS.isKnownNeverInfinity() &&
+ KnownLHS.isKnownNeverLogicalZero(*F, Op->getType())) ||
+ (KnownLHS.isKnownNeverLogicalZero(*F, Op->getType()) &&
+ KnownRHS.isKnownNeverLogicalZero(*F, Op->getType())))
----------------
This is still simpler.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152957/new/
https://reviews.llvm.org/D152957
More information about the llvm-commits
mailing list