diff options
Diffstat (limited to 'lib/IR/IntrinsicInst.cpp')
-rw-r--r-- | lib/IR/IntrinsicInst.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/IR/IntrinsicInst.cpp b/lib/IR/IntrinsicInst.cpp index 787889934d82..df3a38ac147f 100644 --- a/lib/IR/IntrinsicInst.cpp +++ b/lib/IR/IntrinsicInst.cpp @@ -32,10 +32,11 @@ using namespace llvm; //===----------------------------------------------------------------------===// -/// DbgInfoIntrinsic - This is the common base class for debug info intrinsics +/// DbgVariableIntrinsic - This is the common base class for debug info +/// intrinsics for variables. /// -Value *DbgInfoIntrinsic::getVariableLocation(bool AllowNullOp) const { +Value *DbgVariableIntrinsic::getVariableLocation(bool AllowNullOp) const { Value *Op = getArgOperand(0); if (AllowNullOp && !Op) return nullptr; @@ -45,14 +46,11 @@ Value *DbgInfoIntrinsic::getVariableLocation(bool AllowNullOp) const { return V->getValue(); // When the value goes to null, it gets replaced by an empty MDNode. - assert((isa<DbgLabelInst>(this) - || !cast<MDNode>(MD)->getNumOperands()) - && "DbgValueInst Expected an empty MDNode"); - + assert(!cast<MDNode>(MD)->getNumOperands() && "Expected an empty MDNode"); return nullptr; } -Optional<uint64_t> DbgInfoIntrinsic::getFragmentSizeInBits() const { +Optional<uint64_t> DbgVariableIntrinsic::getFragmentSizeInBits() const { if (auto Fragment = getExpression()->getFragmentInfo()) return Fragment->SizeInBits; return getVariable()->getSizeInBits(); @@ -154,6 +152,10 @@ bool ConstrainedFPIntrinsic::isUnaryOp() const { case Intrinsic::experimental_constrained_log2: case Intrinsic::experimental_constrained_rint: case Intrinsic::experimental_constrained_nearbyint: + case Intrinsic::experimental_constrained_ceil: + case Intrinsic::experimental_constrained_floor: + case Intrinsic::experimental_constrained_round: + case Intrinsic::experimental_constrained_trunc: return true; } } |