diff options
author | Philip Reames <listmail@philipreames.com> | 2021-12-14 08:09:00 -0800 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2021-12-14 08:43:00 -0800 |
commit | 423f19680a4fc60c106cef102730939c3c7ab7ac (patch) | |
tree | 6e47faec0c6da4779b501b2f0ffca032e2b24675 /llvm/lib/Analysis/ValueTracking.cpp | |
parent | 2a4a229d6dcceecbb8bab094b6880e2445a6e465 (diff) | |
download | llvm-423f19680a4fc60c106cef102730939c3c7ab7ac.zip llvm-423f19680a4fc60c106cef102730939c3c7ab7ac.tar.gz llvm-423f19680a4fc60c106cef102730939c3c7ab7ac.tar.bz2 |
Add FMF to hasPoisonGeneratingFlags/dropPoisonGeneratingFlags
These flags are documented as generating poison values for particular input values. As such, we should really be consistent about their handling with how we handle nsw/nuw/exact/inbounds.
Differential Revision: https://reviews.llvm.org/D115460
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 4bec851..1ed2478 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -4977,14 +4977,6 @@ static bool canCreateUndefOrPoison(const Operator *Op, bool PoisonOnly, if (ConsiderFlags && Op->hasPoisonGeneratingFlags()) return true; - // TODO: this should really be under the ConsiderFlags block, but currently - // these are not dropped by dropPoisonGeneratingFlags - if (const auto *FP = dyn_cast<FPMathOperator>(Op)) { - auto FMF = FP->getFastMathFlags(); - if (FMF.noNaNs() || FMF.noInfs()) - return true; - } - unsigned Opcode = Op->getOpcode(); // Check whether opcode is a poison/undef-generating operation |