Skip to content

Commit 0e0a0c8

Browse files
committed
[AMDGPU] Reformat AMDGPUTargetLowering::isSDNodeAlwaysUniform. NFC.
1 parent e82a008 commit 0e0a0c8

File tree

1 file changed

+17
-24
lines changed

1 file changed

+17
-24
lines changed

llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -782,34 +782,27 @@ bool AMDGPUTargetLowering::isCheapToSpeculateCtlz() const {
782782
return true;
783783
}
784784

785-
bool AMDGPUTargetLowering::isSDNodeAlwaysUniform(const SDNode * N) const {
785+
bool AMDGPUTargetLowering::isSDNodeAlwaysUniform(const SDNode *N) const {
786786
switch (N->getOpcode()) {
787-
default:
788-
return false;
789-
case ISD::EntryToken:
790-
case ISD::TokenFactor:
787+
case ISD::EntryToken:
788+
case ISD::TokenFactor:
789+
return true;
790+
case ISD::INTRINSIC_WO_CHAIN: {
791+
unsigned IntrID = cast<ConstantSDNode>(N->getOperand(0))->getZExtValue();
792+
switch (IntrID) {
793+
case Intrinsic::amdgcn_readfirstlane:
794+
case Intrinsic::amdgcn_readlane:
791795
return true;
792-
case ISD::INTRINSIC_WO_CHAIN:
793-
{
794-
unsigned IntrID = cast<ConstantSDNode>(N->getOperand(0))->getZExtValue();
795-
switch (IntrID) {
796-
default:
797-
return false;
798-
case Intrinsic::amdgcn_readfirstlane:
799-
case Intrinsic::amdgcn_readlane:
800-
return true;
801-
}
802796
}
803-
break;
804-
case ISD::LOAD:
805-
{
806-
if (cast<LoadSDNode>(N)->getMemOperand()->getAddrSpace() ==
807-
AMDGPUAS::CONSTANT_ADDRESS_32BIT)
808-
return true;
809-
return false;
810-
}
811-
break;
797+
return false;
798+
}
799+
case ISD::LOAD:
800+
if (cast<LoadSDNode>(N)->getMemOperand()->getAddrSpace() ==
801+
AMDGPUAS::CONSTANT_ADDRESS_32BIT)
802+
return true;
803+
return false;
812804
}
805+
return false;
813806
}
814807

815808
SDValue AMDGPUTargetLowering::getNegatedExpression(

0 commit comments

Comments
 (0)