summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-07-18 19:00:07 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-07-18 19:00:07 +0000
commit210b7cf3e2592cd3c2ea227a9ee5ebd4a72e3ed5 (patch)
treeff0ba41b12dace1677595ca6f4b72178a64a0bc7 /llvm/lib/Target/AMDGPU
parentd2387432bb569b1e96ff22839fe2cae25343e3f7 (diff)
downloadbcm5719-llvm-210b7cf3e2592cd3c2ea227a9ee5ebd4a72e3ed5.tar.gz
bcm5719-llvm-210b7cf3e2592cd3c2ea227a9ee5ebd4a72e3ed5.zip
AMDGPU: Remove pointless dyn_cast_or_null
This is already casted above so non-null llvm-svn: 275881
Diffstat (limited to 'llvm/lib/Target/AMDGPU')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
index 0bad63fa77a..bb7fa6bcb0e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
@@ -550,7 +550,7 @@ bool AMDGPUPromoteAlloca::collectUsesWithPtrTypes(
if (UseInst->getOpcode() == Instruction::PtrToInt)
return false;
- if (LoadInst *LI = dyn_cast_or_null<LoadInst>(UseInst)) {
+ if (LoadInst *LI = dyn_cast<LoadInst>(UseInst)) {
if (LI->isVolatile())
return false;
@@ -564,11 +564,10 @@ bool AMDGPUPromoteAlloca::collectUsesWithPtrTypes(
// Reject if the stored value is not the pointer operand.
if (SI->getPointerOperand() != Val)
return false;
- } else if (AtomicRMWInst *RMW = dyn_cast_or_null<AtomicRMWInst>(UseInst)) {
+ } else if (AtomicRMWInst *RMW = dyn_cast<AtomicRMWInst>(UseInst)) {
if (RMW->isVolatile())
return false;
- } else if (AtomicCmpXchgInst *CAS
- = dyn_cast_or_null<AtomicCmpXchgInst>(UseInst)) {
+ } else if (AtomicCmpXchgInst *CAS = dyn_cast<AtomicCmpXchgInst>(UseInst)) {
if (CAS->isVolatile())
return false;
}
OpenPOWER on IntegriCloud