[AMDGPU] Reformat AMDGPUTargetLowering::isSDNodeAlwaysUniform. NFC.

This commit is contained in:
Jay Foad 2020-09-28 16:19:23 +01:00
parent e82a0084d3
commit 0e0a0c8d2c
1 changed files with 17 additions and 24 deletions

View File

@ -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(