Skip to content

Commit 2cfcf9b

Browse files
angelz913kuhar
andcommitted
Reformat code
Co-authored-by: Jakub Kuderski <[email protected]>
1 parent dbea886 commit 2cfcf9b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -585,24 +585,22 @@ struct VectorInterleaveOpConvert final
585585
LogicalResult
586586
matchAndRewrite(vector::InterleaveOp interleaveOp, OpAdaptor adaptor,
587587
ConversionPatternRewriter &rewriter) const override {
588-
// Check the result vector type
588+
// Check the result vector type.
589589
VectorType oldResultType = interleaveOp.getResultVectorType();
590590
Type newResultType = getTypeConverter()->convertType(oldResultType);
591591
if (!newResultType)
592592
return rewriter.notifyMatchFailure(interleaveOp,
593593
"unsupported result vector type");
594594

595-
// Interleave the indices
595+
// Interleave the indices.
596596
VectorType sourceType = interleaveOp.getSourceVectorType();
597597
int n = sourceType.getNumElements();
598598

599599
// Input vectors of size 1 are converted to scalars by the type converter.
600-
// We cannot use spirv::VectorShuffleOp directly in this case, and need to
601-
// use spirv::CompositeConstructOp.
600+
// We cannot use `spirv::VectorShuffleOp` directly in this case, and need to
601+
// use `spirv::CompositeConstructOp`.
602602
if (n == 1) {
603-
SmallVector<Value> newOperands(2);
604-
newOperands[0] = adaptor.getLhs();
605-
newOperands[1] = adaptor.getRhs();
603+
Value newOperands[] = {adaptor.getLhs(), adaptor.getRhs()};
606604
rewriter.replaceOpWithNewOp<spirv::CompositeConstructOp>(
607605
interleaveOp, newResultType, newOperands);
608606
return success();

0 commit comments

Comments
 (0)