From 8258d56e335ef732cdbb1f93ac3b579b98fbda58 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Wed, 14 Aug 2019 18:01:42 +0000 Subject: [PATCH] InferAddressSpaces: Remove unnecessary check for ConstantInt 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 --- lib/Transforms/Scalar/InferAddressSpaces.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Scalar/InferAddressSpaces.cpp b/lib/Transforms/Scalar/InferAddressSpaces.cpp index 5f0e2001c73..e88d3148258 100644 --- a/lib/Transforms/Scalar/InferAddressSpaces.cpp +++ b/lib/Transforms/Scalar/InferAddressSpaces.cpp @@ -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(II->getArgOperand(4)); - if (!IsVolatile || !IsVolatile->isZero()) + const ConstantInt *IsVolatile = cast(II->getArgOperand(4)); + if (!IsVolatile->isZero()) return false; LLVM_FALLTHROUGH; -- 2.40.0