forked from OSchip/llvm-project
AMDGPU: Remove pointless dyn_cast_or_null
This is already casted above so non-null llvm-svn: 275881
This commit is contained in:
parent
d2387432bb
commit
210b7cf3e2
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue