[Verifier] remove dead code for saturating intrinsics; NFC
authorSanjay Patel <spatel@rotateright.com>
Fri, 19 Feb 2021 19:56:20 +0000 (14:56 -0500)
committerSanjay Patel <spatel@rotateright.com>
Fri, 19 Feb 2021 19:58:25 +0000 (14:58 -0500)
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

index 6027cf8..b6b0117 100644 (file)
@@ -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: