From d79063129c286b02fae04542051856f1229cee3d Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Fri, 19 Feb 2021 14:56:20 -0500 Subject: [PATCH] [Verifier] remove dead code for saturating intrinsics; NFC Test coverage shows that we assert with the string from the tablegen defs file for these intrinsics, so these cases should never be live. --- llvm/lib/IR/Verifier.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 6027cf8..b6b0117 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -5018,22 +5018,6 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) { break; } - case Intrinsic::sadd_sat: - case Intrinsic::uadd_sat: - case Intrinsic::ssub_sat: - case Intrinsic::usub_sat: - case Intrinsic::sshl_sat: - case Intrinsic::ushl_sat: { - Value *Op1 = Call.getArgOperand(0); - Value *Op2 = Call.getArgOperand(1); - Assert(Op1->getType()->isIntOrIntVectorTy(), - "first operand of [us][add|sub|shl]_sat must be an int type or " - "vector of ints"); - Assert(Op2->getType()->isIntOrIntVectorTy(), - "second operand of [us][add|sub|shl]_sat must be an int type or " - "vector of ints"); - break; - } case Intrinsic::smul_fix: case Intrinsic::smul_fix_sat: case Intrinsic::umul_fix: -- 2.7.4