[Mlir-commits] [mlir] [mlir][amdgpu] Promote gpu.shuffle to amdgpu.dpp (PR #155158)

Jakub Kuderski llvmlistbot at llvm.org
Tue Aug 26 07:02:02 PDT 2025


================
@@ -96,13 +97,153 @@ struct PromoteShuffleToPermlanePattern
   }
 };
 
+static Value getLaneId(RewriterBase &rewriter, Location loc) {
+  auto int32Type = IntegerType::get(rewriter.getContext(), 32);
+  Value zero = arith::ConstantIntOp::create(rewriter, loc, 0, 32);
+  Value minus1 = arith::ConstantIntOp::create(rewriter, loc, -1, 32);
+  NamedAttribute noundef = rewriter.getNamedAttr(
+      LLVM::LLVMDialect::getNoUndefAttrName(), rewriter.getUnitAttr());
----------------
kuhar wrote:

You don't need the rewriter for named attributes -- simple initialization should just work:
```suggestion
  NamedAttribute noundef = {
      LLVM::LLVMDialect::getNoUndefAttrName(), rewriter.getUnitAttr()};
```

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


More information about the Mlir-commits mailing list