Skip to content

Commit c702fb1

Browse files
committed
[NVPTX] NFC: remove make pair and early return
1 parent 393bdd6 commit c702fb1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -955,10 +955,7 @@ NVPTX::Scope NVPTXDAGToDAGISel::getOperationScope(MemSDNode *N,
955955
Subtarget->failIfClustersUnsupported("cluster scope");
956956

957957
// If operation is volatile, then its scope is system.
958-
if (N->isVolatile())
959-
S = NVPTX::Scope::System;
960-
961-
return S;
958+
return N->isVolatile() ? NVPTX::Scope::System : S;
962959
}
963960
}
964961

@@ -1083,7 +1080,7 @@ NVPTXDAGToDAGISel::insertMemoryInstructionFence(SDLoc DL, SDValue &Chain,
10831080
formatv("Unexpected fence ordering: \"{}\".",
10841081
OrderingToString(NVPTX::Ordering(FenceOrdering))));
10851082
}
1086-
return std::make_pair(InstructionOrdering, Scope);
1083+
return {InstructionOrdering, Scope};
10871084
}
10881085

10891086
bool NVPTXDAGToDAGISel::tryIntrinsicNoChain(SDNode *N) {

0 commit comments

Comments
 (0)