Skip to content

Commit 9e92003

Browse files
committed
Refactor
1 parent a4572c2 commit 9e92003

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,11 +1662,9 @@ static bool shouldConvertToIndirectCall(const CallBase *CB,
16621662
const GlobalAddressSDNode *Func) {
16631663
if (!Func)
16641664
return false;
1665-
auto *CalleeFunc = dyn_cast<Function>(Func->getGlobal());
1666-
if (!CalleeFunc)
1667-
return false;
1668-
1669-
return CB->getFunctionType() != CalleeFunc->getFunctionType();
1665+
if (auto *CalleeFunc = dyn_cast<Function>(Func->getGlobal()))
1666+
return CB->getFunctionType() != CalleeFunc->getFunctionType();
1667+
return false;
16701668
}
16711669

16721670
SDValue NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,

0 commit comments

Comments
 (0)