[Mlir-commits] [mlir] [MLIR][XeGPU] Introduce `xegpu::uArch` usage in target-sensitive passes (PR #163801)

Charitha Saumya llvmlistbot at llvm.org
Mon Oct 27 15:05:58 PDT 2025


================
@@ -228,9 +228,14 @@ struct MoveFuncBodyToWarpOp : public OpRewritePattern<gpu::GPUFuncOp> {
         rewriter, newGpuFunc.getLoc(), rewriter.getIndexType(),
         /** upperBound = **/ mlir::IntegerAttr());
     ArrayRef<Type> gpuFuncResultType = gpuFuncOp.getFunctionType().getResults();
+    auto uArch = getUArch(xegpu::getChipStr(gpuFuncOp).value_or(""));
+    if (!uArch)
----------------
charithaintc wrote:

I would move the error check above to avoid mutating the IR and potentially bailig out with a broken IR. 

https://github.com/llvm/llvm-project/pull/163801


More information about the Mlir-commits mailing list