The IR is invalid if this isn't a constant since immarg was added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368893
91177308-0d34-0410-b5e6-
96231b3b80d8
case Intrinsic::amdgcn_ds_fadd:
case Intrinsic::amdgcn_ds_fmin:
case Intrinsic::amdgcn_ds_fmax: {
- const ConstantInt *IsVolatile = dyn_cast<ConstantInt>(II->getArgOperand(4));
- if (!IsVolatile || !IsVolatile->isZero())
+ const ConstantInt *IsVolatile = cast<ConstantInt>(II->getArgOperand(4));
+ if (!IsVolatile->isZero())
return false;
LLVM_FALLTHROUGH;