InferAddressSpaces: Remove unnecessary check for ConstantInt

The IR is invalid if this isn't a constant since immarg was added.

llvm-svn: 368893
This commit is contained in:
Matt Arsenault 2019-08-14 18:01:42 +00:00
parent 3f9d044686
commit 0eac2a2963
1 changed files with 2 additions and 2 deletions

View File

@ -269,8 +269,8 @@ bool InferAddressSpaces::rewriteIntrinsicOperands(IntrinsicInst *II,
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;