[llvm] 6f0bb77 - [InstCombine] Fold one-use variable into assert
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 24 09:01:22 PDT 2019
Author: Benjamin Kramer
Date: 2019-10-24T17:57:24+02:00
New Revision: 6f0bb7703705e8e63966fae96e5a2f9a8312b0b2
URL: https://github.com/llvm/llvm-project/commit/6f0bb7703705e8e63966fae96e5a2f9a8312b0b2
DIFF: https://github.com/llvm/llvm-project/commit/6f0bb7703705e8e63966fae96e5a2f9a8312b0b2.diff
LOG: [InstCombine] Fold one-use variable into assert
Avoids warnings in Release builds. NFC.
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 072f02f36657..654de3ee0172 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -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);
More information about the llvm-commits
mailing list