diff options
Diffstat (limited to 'llvm/lib/IR/ConstantRange.cpp')
-rw-r--r-- | llvm/lib/IR/ConstantRange.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp index bd65aede940..157473f84f2 100644 --- a/llvm/lib/IR/ConstantRange.cpp +++ b/llvm/lib/IR/ConstantRange.cpp @@ -191,8 +191,7 @@ ConstantRange::makeGuaranteedNoWrapRegion(Instruction::BinaryOps BinOp, return CR0.inverse().unionWith(CR1.inverse()).inverse(); }; - assert(BinOp >= Instruction::BinaryOpsBegin && - BinOp < Instruction::BinaryOpsEnd && "Binary operators only!"); + assert(Instruction::isBinaryOp(BinOp) && "Binary operators only!"); assert((NoWrapKind == OBO::NoSignedWrap || NoWrapKind == OBO::NoUnsignedWrap || @@ -665,8 +664,7 @@ ConstantRange ConstantRange::sextOrTrunc(uint32_t DstTySize) const { ConstantRange ConstantRange::binaryOp(Instruction::BinaryOps BinOp, const ConstantRange &Other) const { - assert(BinOp >= Instruction::BinaryOpsBegin && - BinOp < Instruction::BinaryOpsEnd && "Binary operators only!"); + assert(Instruction::isBinaryOp(BinOp) && "Binary operators only!"); switch (BinOp) { case Instruction::Add: |