[Mlir-commits] [mlir] [mlir][LLVM] Add !invariant.load metadata support to llvm.load (PR #76754)
Tobias Gysi
llvmlistbot at llvm.org
Wed Jan 3 10:11:48 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:
Ah I see. I guess for metadata the long name makes a bit more sense since it may collide with other metadata kinds. Up to you what you prefer I guess.
https://github.com/llvm/llvm-project/pull/76754
More information about the Mlir-commits
mailing list