Skip to content

Commit

Permalink
Fix coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
nbpatel authored and silee2 committed Nov 15, 2023
1 parent 00f5d7f commit 8d4ecbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions lib/Conversion/XeGPUToSPIRV/XeGPUToSPIRV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,10 +510,9 @@ std::optional<xegpu::CreateNdDescOp> findDescOp(mlir::Value val) {
auto forOp = cast<scf::ForOp>(ownerOp);
auto init = forOp.getInits()[arg.getArgNumber() - 1];
return findDescOp(init);
} else {
assert(0 && "add more support");
return std::nullopt;
}
}
// Add more support
return std::nullopt;
}

template <typename OpType>
Expand Down
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 (const 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

0 comments on commit 8d4ecbd

Please sign in to comment.