[clang] [llvm] [mlir] [AMDGPU] add clamp immediate operand to WMMA iu8 intrinsic (PR #171069)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 18 12:19:54 PST 2025


================
@@ -0,0 +1,21 @@
+; RUN: llvm-as < %s | llvm-dis | FileCheck %s
+
+; Verify that the legacy WMMA IU8 intrinsic without the clamp operand is
+; upgraded by appending clamp=false.
+
+define <8 x i32> @wmma_legacy(<8 x i32> %a, <8 x i32> %b, <8 x i32> %c) {
+; CHECK-LABEL: @wmma_legacy(
+; CHECK-NEXT: call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x64.iu8.v8i32.v8i32(i1 false, <8 x i32> %a, i1 false, <8 x i32> %b, <8 x i32> %c, i1 false, i1 false, i1 false) #1, !annotation !0
+; CHECK-NEXT: ret <8 x i32>
+  %res = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x64.iu8.v8i32.v8i32(
+      i1 false, <8 x i32> %a, i1 false, <8 x i32> %b, <8 x i32> %c,
+      i1 false, i1 false) #1, !annotation !0
----------------
arsenm wrote:

```suggestion
      i1 false, i1 false) #0, !annotation !0
```

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


More information about the llvm-commits mailing list