[Mlir-commits] [mlir] Add non-temporal support for LLVM masked loads (PR #104598)

Giuseppe Rossini llvmlistbot at llvm.org
Fri Aug 16 09:09:52 PDT 2024


================
@@ -842,22 +842,26 @@ def LLVM_GetActiveLaneMaskOp
 /// Create a call to Masked Load intrinsic.
 def LLVM_MaskedLoadOp : LLVM_OneResultIntrOp<"masked.load"> {
   let arguments = (ins LLVM_AnyPointer:$data, LLVM_VectorOf<I1>:$mask,
-                   Variadic<LLVM_AnyVector>:$pass_thru, I32Attr:$alignment);
+                   Variadic<LLVM_AnyVector>:$pass_thru, I32Attr:$alignment,
+                   DefaultValuedAttr<BoolAttr, "false">:$nontemporal);
----------------
giuseros wrote:

Hi @gysit , thanks for the review! I tried your code, but I got:
```
 no known conversion from 'bool' to '::mlir::UnitAttr'
```
I noticed that in `LLVMIntrinsicOps.td` there is no use of `UnitAttr` . I think because we use the `$_int_attr($alignment)` we need to have a `UnitAttr` passed (instead of a bool). 

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


More information about the Mlir-commits mailing list