[InstCombine] Fold one-use variable into assert
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 24 Oct 2019 15:57:24 +0000 (17:57 +0200)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 24 Oct 2019 15:57:24 +0000 (17:57 +0200)
Avoids warnings in Release builds. NFC.

llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp

index 072f02f..654de3e 100644 (file)
@@ -3312,8 +3312,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
   case Intrinsic::arm_mve_vadc_predicated: {
     unsigned CarryOp =
         (II->getIntrinsicID() == Intrinsic::arm_mve_vadc_predicated) ? 3 : 2;
-    Value *CarryArg = II->getArgOperand(CarryOp);
-    assert(CarryArg->getType()->getScalarSizeInBits() == 32 &&
+    assert(II->getArgOperand(CarryOp)->getType()->getScalarSizeInBits() == 32 &&
            "Bad type for intrinsic!");
 
     KnownBits CarryKnown(32);