Skip to content

Commit 9cfbdad

Browse files
committed
Clang format
1 parent db9a09c commit 9cfbdad

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,17 @@ static bool Is16bitsType(MVT VT) {
163163
VT.SimpleTy == MVT::i16);
164164
}
165165

166-
// When legalizing vector loads/stores, this function is called, which does two things:
167-
// 1. Determines Whether the vector is something we want to custom lower, std::nullopt is returned if we do not want to custom lower it.
166+
// When legalizing vector loads/stores, this function is called, which does two
167+
// things:
168+
// 1. Determines Whether the vector is something we want to custom lower,
169+
// std::nullopt is returned if we do not want to custom lower it.
168170
// 2. If we do want to handle it, returns three parameters:
169171
// - unsigned int NumElts - The number of elements in the final vector
170172
// - EVT EltVT - The type of the elements in the final vector
171-
// - bool UpsizeElementTypes - Whether or not we are upsizing the elements of the vectors
172-
static std::optional<std::tuple<unsigned int, EVT, bool>> tryGetVectorLoweringParams(EVT ValVT) {
173+
// - bool UpsizeElementTypes - Whether or not we are upsizing the elements of
174+
// the vector
175+
static std::optional<std::tuple<unsigned int, EVT, bool>>
176+
tryGetVectorLoweringParams(EVT ValVT) {
173177
// Despite vectors like v8i8, v16i8, v8i16 being within the bit-limit for
174178
// total load/store size, PTX syntax only supports v2/v4. Thus, we can't use
175179
// vectorized loads/stores with the actual element type for i8/i16 as that
@@ -2885,8 +2889,7 @@ NVPTXTargetLowering::LowerSTOREVector(SDValue Op, SelectionDAG &DAG) const {
28852889
const DataLayout &TD = DAG.getDataLayout();
28862890

28872891
Align Alignment = MemSD->getAlign();
2888-
Align PrefAlign =
2889-
TD.getPrefTypeAlign(ValVT.getTypeForEVT(*DAG.getContext()));
2892+
Align PrefAlign = TD.getPrefTypeAlign(ValVT.getTypeForEVT(*DAG.getContext()));
28902893
if (Alignment < PrefAlign) {
28912894
// This store is not sufficiently aligned, so bail out and let this vector
28922895
// store be scalarized. Note that we may still be able to emit smaller
@@ -2935,7 +2938,7 @@ NVPTXTargetLowering::LowerSTOREVector(SDValue Op, SelectionDAG &DAG) const {
29352938
} else {
29362939
for (unsigned i = 0; i < NumElts; ++i) {
29372940
SDValue ExtVal = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, EltVT, Val,
2938-
DAG.getIntPtrConstant(i, DL));
2941+
DAG.getIntPtrConstant(i, DL));
29392942
if (NeedExt)
29402943
ExtVal = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i16, ExtVal);
29412944
Ops.push_back(ExtVal);

0 commit comments

Comments
 (0)