[Mlir-commits] [mlir] [mlir][LLVM] Add !invariant.load metadata support to llvm.load (PR #76754)
Tobias Gysi
llvmlistbot at llvm.org
Tue Jan 2 23:48:27 PST 2024
================
@@ -381,13 +383,14 @@ def LLVM_LoadOp : LLVM_MemAccessOpBase<"load",
$res = $_builder.create<LLVM::LoadOp>($_location, $_resultType, $addr,
alignment, loadInst->isVolatile(),
loadInst->hasMetadata(llvm::LLVMContext::MD_nontemporal),
+ loadInst->hasMetadata(llvm::LLVMContext::MD_invariant_load),
convertAtomicOrderingFromLLVM(loadInst->getOrdering()),
getLLVMSyncScope(loadInst));
}];
let builders = [
OpBuilder<(ins "Type":$type, "Value":$addr,
CArg<"unsigned", "0">:$alignment, CArg<"bool", "false">:$isVolatile,
- CArg<"bool", "false">:$isNonTemporal,
+ CArg<"bool", "false">:$isNonTemporal, CArg<"bool", "false">:$isInvariantLoad,
----------------
gysit wrote:
ultra nit: I would probably go with `isInvariant` since the flag is already on the load op?
https://github.com/llvm/llvm-project/pull/76754
More information about the Mlir-commits
mailing list