Skip to content

Commit

Permalink
Fix coverity issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nbpatel authored and silee2 committed Nov 15, 2023
1 parent 3f5cd3b commit 00f5d7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Conversion/XeTileToXeGPU/SCFOpConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ bool isLegalSCFOp(mlir::Operation *op) {

if (llvm::isa<mlir::scf::YieldOp>(op)) {
auto yieldOp = llvm::cast<mlir::scf::YieldOp>(op);
for (auto arg : yieldOp.getResults()) {
for (const auto arg : yieldOp.getResults()) {
auto type = arg.getType();
result &= !type.isa<imex::xetile::TileType>();
if (type.isa<mlir::VectorType>())
Expand Down
2 changes: 1 addition & 1 deletion lib/Conversion/XeTileToXeGPU/XeTileOpConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ struct SgUpdateTileOffsetOpPattern
auto tiles = adaptor.getTile();

llvm::SmallVector<mlir::Value> xegpuOps;
for (auto tile : tiles) {
for (const auto &tile : tiles) {
auto xegpuTile = rewriter.create<xegpu::UpdateNDOffsetOp>(
op.getLoc(), tile.getType(), tile, mlir::ValueRange{offsetX, offsetY},
imex::xegpu::Mode::VC);
Expand Down

0 comments on commit 00f5d7f

Please sign in to comment.