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
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);