[Mlir-commits] [mlir] [mlir][SPIR-V] Support spirv.loop_control attribute on scf.for and scf.while (PR #189392)

Arseniy Obolenskiy llvmlistbot at llvm.org
Mon Mar 30 21:03:13 PDT 2026


================
@@ -135,8 +135,11 @@ struct ForOpConversion final : SCFToSPIRVPattern<scf::ForOp> {
     // a single back edge from the continue to header block, and a single exit
     // from header to merge.
     auto loc = forOp.getLoc();
-    auto loopOp =
-        spirv::LoopOp::create(rewriter, loc, spirv::LoopControl::None);
+    auto loopControl = spirv::LoopControl::None;
+    if (auto attr =
+            forOp->getAttrOfType<spirv::LoopControlAttr>("spirv.loop_control"))
----------------
aobolensk wrote:

Done, thanks

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


More information about the Mlir-commits mailing list