From 49caf7012170422afa84868598063818f9344228 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Tue, 3 Jan 2023 10:03:58 -0500 Subject: [PATCH] AMDGPU: Use cast instead of unchecked dyn_cast --- llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp index ef895c0..5319aac 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp @@ -426,7 +426,7 @@ static bool tryPromoteAllocaToVector(AllocaInst *Alloca, const DataLayout &DL, Type *VecEltTy = VectorTy->getElementType(); while (!Uses.empty()) { Use *U = Uses.pop_back_val(); - Instruction *Inst = dyn_cast(U->getUser()); + Instruction *Inst = cast(U->getUser()); if (Value *Ptr = getLoadStorePointerOperand(Inst)) { // This is a store of the pointer, not to the pointer. -- 2.7.4