[clang] [CIR] Upstream ClearCacheOp support for __builtin___clear_cache (PR #178260)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 27 10:35:44 PST 2026


================
@@ -5254,6 +5111,26 @@ def CIR_PrefetchOp : CIR_Op<"prefetch"> {
     }];
 }
 
+//===----------------------------------------------------------------------===//
+// ClearCacheOp
+//===----------------------------------------------------------------------===//
+
+def CIR_ClearCacheOp : CIR_Op<"clear_cache", [
+  AllTypesMatch<["begin", "end"]>
+]> {
+  let summary = "clear cache operation";
+  let description = [{
+    CIR representation for `__builtin___clear_cache`.
+  }];
+
+  let arguments = (ins CIR_VoidPtrType:$begin, CIR_VoidPtrType:$end);
+  let assemblyFormat = [{
+    $begin `:` qualified(type($begin)) `,`
+    $end `,`
+    attr-dict
+  }];
----------------
andykaylor wrote:

```suggestion
  let assemblyFormat = [{
    $begin `,` $end `:` qualified(type($begin))
    attr-dict
  }];
```

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


More information about the cfe-commits mailing list