[llvm] r365046 - [ARM] Fix for NDEBUG builds
Sam Parker via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 3 07:39:23 PDT 2019
Author: sam_parker
Date: Wed Jul 3 07:39:23 2019
New Revision: 365046
URL: http://llvm.org/viewvc/llvm-project?rev=365046&view=rev
Log:
[ARM] Fix for NDEBUG builds
Fix unused variable warning as well as a nonsense assert.
Differential Revision: https://reviews.llvm.org/D63816
Modified:
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=365046&r1=365045&r2=365046&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Wed Jul 3 07:39:23 2019
@@ -12964,10 +12964,9 @@ static SDValue PerformHWLoopCombine(SDNo
if (IntOp != Intrinsic::test_set_loop_iterations)
return SDValue();
- if (auto *Const = dyn_cast<ConstantSDNode>(CC->getOperand(1)))
- assert(Const->isOne() && "Expected to compare against 1");
- else
- assert(Const->isOne() && "Expected to compare against 1");
+ assert((isa<ConstantSDNode>(CC->getOperand(1)) &&
+ cast<ConstantSDNode>(CC->getOperand(1))->isOne()) &&
+ "Expected to compare against 1");
SDLoc dl(Int);
SDValue Chain = N->getOperand(0);
More information about the llvm-commits
mailing list