forked from OSchip/llvm-project
[AMDGPU] isSDNodeAlwaysUniform - silence static analyzer dyn_cast<LoadSDNode> null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, but we should be able to use cast<LoadSDNode> directly and if not assert will fire for us. llvm-svn: 372528
This commit is contained in:
parent
96f35266a5
commit
557cee337b
|
@ -718,9 +718,8 @@ bool AMDGPUTargetLowering::isSDNodeAlwaysUniform(const SDNode * N) const {
|
|||
break;
|
||||
case ISD::LOAD:
|
||||
{
|
||||
const LoadSDNode * L = dyn_cast<LoadSDNode>(N);
|
||||
if (L->getMemOperand()->getAddrSpace()
|
||||
== AMDGPUAS::CONSTANT_ADDRESS_32BIT)
|
||||
if (cast<LoadSDNode>(N)->getMemOperand()->getAddrSpace() ==
|
||||
AMDGPUAS::CONSTANT_ADDRESS_32BIT)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue