Skip to content

Commit c240c78

Browse files
committed
Clean up
1 parent a7fb584 commit c240c78

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,15 @@ struct TestXeGPUUnrollingPatterns
7575
tdescTy = prefetchOp.getTensorDescType();
7676
} else if (auto loadOp = dyn_cast<xegpu::LoadGatherOp>(op)) {
7777
if (loadOp.getOffsets()) {
78-
xegpu::DistributeLayoutAttr layout =
79-
xegpu::getDistributeLayoutAttr(loadOp.getResult());
78+
auto layout = xegpu::getDistributeLayoutAttr(loadOp.getResult());
8079
if (layout && layout.isForSubgroup()) {
8180
auto inst_data = layout.getEffectiveInstDataAsInt();
8281
if (!inst_data.empty())
8382
return SmallVector<int64_t>(inst_data.begin(), inst_data.end());
84-
} else {
85-
return std::nullopt;
8683
}
87-
} else if (!loadOp.getOffsets()) {
88-
tdescTy = loadOp.getTensorDescType();
84+
return std::nullopt;
8985
}
86+
tdescTy = loadOp.getTensorDescType();
9087
} else if (auto storeOp = dyn_cast<xegpu::StoreScatterOp>(op)) {
9188
if (storeOp.getOffsets()) {
9289
auto layout = llvm::dyn_cast_or_null<xegpu::LayoutAttr>(
@@ -95,12 +92,10 @@ struct TestXeGPUUnrollingPatterns
9592
auto inst_data = layout.getEffectiveInstDataAsInt();
9693
if (!inst_data.empty())
9794
return SmallVector<int64_t>(inst_data.begin(), inst_data.end());
98-
} else {
99-
return std::nullopt;
10095
}
101-
} else if (!storeOp.getOffsets()) {
102-
tdescTy = storeOp.getTensorDescType();
96+
return std::nullopt;
10397
}
98+
tdescTy = storeOp.getTensorDescType();
10499
}
105100

106101
if (auto layout = tdescTy.getLayoutAttr()) {

0 commit comments

Comments
 (0)