forked from OSchip/llvm-project
[AMDGPU] Reformat AMDGPUTargetLowering::isSDNodeAlwaysUniform. NFC.
This commit is contained in:
parent
e82a0084d3
commit
0e0a0c8d2c
|
@ -782,34 +782,27 @@ bool AMDGPUTargetLowering::isCheapToSpeculateCtlz() const {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool AMDGPUTargetLowering::isSDNodeAlwaysUniform(const SDNode * N) const {
|
||||
bool AMDGPUTargetLowering::isSDNodeAlwaysUniform(const SDNode *N) const {
|
||||
switch (N->getOpcode()) {
|
||||
default:
|
||||
return false;
|
||||
case ISD::EntryToken:
|
||||
case ISD::TokenFactor:
|
||||
case ISD::EntryToken:
|
||||
case ISD::TokenFactor:
|
||||
return true;
|
||||
case ISD::INTRINSIC_WO_CHAIN: {
|
||||
unsigned IntrID = cast<ConstantSDNode>(N->getOperand(0))->getZExtValue();
|
||||
switch (IntrID) {
|
||||
case Intrinsic::amdgcn_readfirstlane:
|
||||
case Intrinsic::amdgcn_readlane:
|
||||
return true;
|
||||
case ISD::INTRINSIC_WO_CHAIN:
|
||||
{
|
||||
unsigned IntrID = cast<ConstantSDNode>(N->getOperand(0))->getZExtValue();
|
||||
switch (IntrID) {
|
||||
default:
|
||||
return false;
|
||||
case Intrinsic::amdgcn_readfirstlane:
|
||||
case Intrinsic::amdgcn_readlane:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ISD::LOAD:
|
||||
{
|
||||
if (cast<LoadSDNode>(N)->getMemOperand()->getAddrSpace() ==
|
||||
AMDGPUAS::CONSTANT_ADDRESS_32BIT)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
return false;
|
||||
}
|
||||
case ISD::LOAD:
|
||||
if (cast<LoadSDNode>(N)->getMemOperand()->getAddrSpace() ==
|
||||
AMDGPUAS::CONSTANT_ADDRESS_32BIT)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
SDValue AMDGPUTargetLowering::getNegatedExpression(
|
||||
|
|
Loading…
Reference in New Issue