[Mlir-commits] [mlir] 8e59c3a - [XeVM] Fix the cache-control metadata string generation. (#187591)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Mar 27 19:18:22 PDT 2026


Author: Md Abdullah Shahneous Bari
Date: 2026-03-27T21:18:18-05:00
New Revision: 8e59c3a816d3281e00582ee553f8fdfdfa52ea39

URL: https://github.com/llvm/llvm-project/commit/8e59c3a816d3281e00582ee553f8fdfdfa52ea39
DIFF: https://github.com/llvm/llvm-project/commit/8e59c3a816d3281e00582ee553f8fdfdfa52ea39.diff

LOG: [XeVM] Fix the cache-control metadata string generation. (#187591)

Previously, it generated extra `single` quote marks around the outer
braces (i.e., `'{'` `6442:\220,1\22` `'}'`). SPIR-V backend does not
expect that. It expects `{6442:\220,1\22}`.

Added: 
    

Modified: 
    mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp b/mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp
index 05485e6257915..e6acc0525fdd5 100644
--- a/mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp
+++ b/mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp
@@ -306,10 +306,10 @@ buildCacheControlPayloads(ArrayRef<Attribute> attrs) {
 
     // Produce: {SPIR-V decoration token:"L1 cache control,L3 cache control"}
     // The quote char (0x22) is embedded literally; LLVM IR prints it as \22.
-    std::string entry = llvm::formatv("'{'{0}:\"{1},{2}\"'}'",
-                                      tokenAttr.getValue().getZExtValue(),
-                                      secondAttr.getValue().getZExtValue(),
-                                      thirdAttr.getValue().getZExtValue());
+    std::string entry =
+        llvm::formatv("{{{0}:\"{1},{2}\"}", tokenAttr.getValue().getZExtValue(),
+                      secondAttr.getValue().getZExtValue(),
+                      thirdAttr.getValue().getZExtValue());
 
     // Deduplicate identical annotations.
     if (!seen.insert({entry, true}).second)


        


More information about the Mlir-commits mailing list