[llvm] d790631 - [Verifier] remove dead code for saturating intrinsics; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 11:58:55 PST 2021


Author: Sanjay Patel
Date: 2021-02-19T14:58:25-05:00
New Revision: d79063129c286b02fae04542051856f1229cee3d

URL: https://github.com/llvm/llvm-project/commit/d79063129c286b02fae04542051856f1229cee3d
DIFF: https://github.com/llvm/llvm-project/commit/d79063129c286b02fae04542051856f1229cee3d.diff

LOG: [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.

Added: 
    

Modified: 
    llvm/lib/IR/Verifier.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 6027cf85a413..b6b01177425a 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:


        


More information about the llvm-commits mailing list