From: Sam Parker Date: Wed, 3 Jul 2019 14:39:23 +0000 (+0000) Subject: [ARM] Fix for NDEBUG builds X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=557d582ad1d644262f2de47a269adfe8ffcf0827;p=llvm [ARM] Fix for NDEBUG builds Fix unused variable warning as well as a nonsense assert. Differential Revision: https://reviews.llvm.org/D63816 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365046 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index c1668dcb5b7..28d014c297e 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -12964,10 +12964,9 @@ static SDValue PerformHWLoopCombine(SDNode *N, if (IntOp != Intrinsic::test_set_loop_iterations) return SDValue(); - if (auto *Const = dyn_cast(CC->getOperand(1))) - assert(Const->isOne() && "Expected to compare against 1"); - else - assert(Const->isOne() && "Expected to compare against 1"); + assert((isa(CC->getOperand(1)) && + cast(CC->getOperand(1))->isOne()) && + "Expected to compare against 1"); SDLoc dl(Int); SDValue Chain = N->getOperand(0);