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