[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
Sun Dec 14 00:21:58 PST 2025


================
@@ -1665,6 +1665,24 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
     if (AppendFalseForOpselArg)
       Args.push_back(Builder.getFalse());
 
+    if (BuiltinID == AMDGPU::BI__builtin_amdgcn_wmma_i32_16x16x64_iu8) {
+      if (Args.size() == 7)
+        Args.push_back(Builder.getFalse());
+
+      auto ToBool = [&](Value *V) {
+        if (V->getType()->isIntegerTy(1))
+          return V;
+        return Builder.CreateIntCast(V, Builder.getInt1Ty(), false);
----------------
arsenm wrote:

This shouldn't require casting here, this should have been an implicit cast in the AST to start with 

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


More information about the llvm-commits mailing list