[llvm] [LLVM][AArch64] Add target-aware printing for target memory locations (PR #178689)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 9 09:47:32 PST 2026
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/178689
>From 7fd954ecdbb872b64a7bfc559af2316b92cf5d7c Mon Sep 17 00:00:00 2001
From: CarolineConcatto <caroline.concatto at arm.com>
Date: Thu, 29 Jan 2026 15:21:54 +0000
Subject: [PATCH 1/2] [LLVM][AArch64] Add target-aware printing for target
memory locations
This patch improves the printing of target memory locations.
It adds a target triple interface to IR attributes so that, when a target
is known, the printer can emit a more specific, target-defined name for
the memory location. If no target is available, the existing behavior is
preserved.
To support this, the patch introduces target-specific tokens for memory
locations.
This change does not add any TableGen definitions for specific targets.
Those can be added if needed.
---
llvm/include/llvm/AsmParser/LLToken.h | 4 +++
llvm/include/llvm/IR/Attributes.h | 7 ++--
llvm/include/llvm/TargetParser/Triple.h | 13 +++++++
llvm/lib/AsmParser/LLLexer.cpp | 2 ++
llvm/lib/AsmParser/LLParser.cpp | 2 ++
llvm/lib/IR/AsmWriter.cpp | 13 +++----
llvm/lib/IR/AttributeImpl.h | 3 +-
llvm/lib/IR/Attributes.cpp | 19 +++++-----
llvm/lib/TargetParser/Triple.cpp | 23 ++++++++++++
.../Assembler/aarch64-memory-attribute.ll | 35 +++++++++++++++++++
10 files changed, 103 insertions(+), 18 deletions(-)
create mode 100644 llvm/test/Assembler/aarch64-memory-attribute.ll
diff --git a/llvm/include/llvm/AsmParser/LLToken.h b/llvm/include/llvm/AsmParser/LLToken.h
index 24f84cfa09e34..91d4621b85a42 100644
--- a/llvm/include/llvm/AsmParser/LLToken.h
+++ b/llvm/include/llvm/AsmParser/LLToken.h
@@ -210,6 +210,10 @@ enum Kind {
kw_target_mem1,
kw_errnomem,
+ // Target Specific Memory attributes
+ kw_aarch64_fpmr,
+ kw_aarch64_za,
+
// Legacy attributes:
kw_argmemonly,
kw_inaccessiblememonly,
diff --git a/llvm/include/llvm/IR/Attributes.h b/llvm/include/llvm/IR/Attributes.h
index 534d96d2c46e5..4c0ca769b05b3 100644
--- a/llvm/include/llvm/IR/Attributes.h
+++ b/llvm/include/llvm/IR/Attributes.h
@@ -25,6 +25,7 @@
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ModRef.h"
#include "llvm/Support/PointerLikeTypeTraits.h"
+#include "llvm/TargetParser/Triple.h"
#include <cassert>
#include <cstdint>
#include <optional>
@@ -355,7 +356,8 @@ class Attribute {
/// The Attribute is converted to a string of equivalent mnemonic. This
/// is, presumably, for writing out the mnemonics for the assembly writer.
- LLVM_ABI std::string getAsString(bool InAttrGrp = false) const;
+ LLVM_ABI std::string getAsString(const Triple *TT = nullptr,
+ bool InAttrGrp = false) const;
/// Return true if this attribute belongs to the LLVMContext.
LLVM_ABI bool hasParentContext(LLVMContext &C) const;
@@ -503,7 +505,8 @@ class AttributeSet {
LLVM_ABI MemoryEffects getMemoryEffects() const;
LLVM_ABI CaptureInfo getCaptureInfo() const;
LLVM_ABI FPClassTest getNoFPClass() const;
- LLVM_ABI std::string getAsString(bool InAttrGrp = false) const;
+ LLVM_ABI std::string getAsString(const Triple *TT = nullptr,
+ bool InAttrGrp = false) const;
/// Return true if this attribute set belongs to the LLVMContext.
LLVM_ABI bool hasParentContext(LLVMContext &C) const;
diff --git a/llvm/include/llvm/TargetParser/Triple.h b/llvm/include/llvm/TargetParser/Triple.h
index 8559d7b088ee1..c8e2fb7c505ea 100644
--- a/llvm/include/llvm/TargetParser/Triple.h
+++ b/llvm/include/llvm/TargetParser/Triple.h
@@ -334,6 +334,15 @@ class Triple {
XCOFF,
};
+ // This should be a copy from enum class TargetMemLoc
+ // in ModRef.h
+ enum class TargetMemLoc : uint8_t {
+ TargetMem0 = 4,
+ TargetMem1 = 5,
+ // Reserve more if/when needed
+ Last
+ };
+
private:
std::string Data;
@@ -1226,6 +1235,10 @@ class Triple {
/// Tests if the environment supports dllimport/export annotations.
bool hasDLLImportExport() const { return isOSWindows() || isPS(); }
+ StringRef aarch64GetTargetMemLocName(TargetMemLoc Kind) const;
+
+ StringRef getTargetMemLocName(TargetMemLoc Kind) const;
+
/// @}
/// @name Mutators
/// @{
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp
index 4e7e31da09a52..d116d6ec9e753 100644
--- a/llvm/lib/AsmParser/LLLexer.cpp
+++ b/llvm/lib/AsmParser/LLLexer.cpp
@@ -719,6 +719,8 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(address);
KEYWORD(provenance);
KEYWORD(read_provenance);
+ KEYWORD(aarch64_fpmr);
+ KEYWORD(aarch64_za);
// nofpclass attribute
KEYWORD(all);
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 068b52fcf0995..7ae8a49086d98 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -2577,8 +2577,10 @@ static std::optional<MemoryEffects::Location> keywordToLoc(lltok::Kind Tok) {
case lltok::kw_errnomem:
return IRMemLocation::ErrnoMem;
case lltok::kw_target_mem0:
+ case lltok::kw_aarch64_fpmr:
return IRMemLocation::TargetMem0;
case lltok::kw_target_mem1:
+ case lltok::kw_aarch64_za:
return IRMemLocation::TargetMem1;
default:
return std::nullopt;
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index b3e0323fd8633..0e9b6bb63e81b 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -2907,7 +2907,7 @@ class AssemblyWriter {
void writeMDNode(unsigned Slot, const MDNode *Node);
void writeAttribute(const Attribute &Attr, bool InAttrGroup = false);
void writeAttributeSet(const AttributeSet &AttrSet, bool InAttrGroup = false);
- void writeAllAttributeGroups();
+ void writeAllAttributeGroups(const Triple *TT = nullptr);
void printTypeIdentities();
void printGlobal(const GlobalVariable *GV);
@@ -3166,7 +3166,7 @@ void AssemblyWriter::printModule(const Module *M) {
// Output all attribute groups.
if (!Machine.as_empty()) {
Out << '\n';
- writeAllAttributeGroups();
+ writeAllAttributeGroups(&M->getTargetTriple());
}
// Output named metadata.
@@ -4113,7 +4113,7 @@ void AssemblyWriter::printFunction(const Function *F) {
for (const Attribute &Attr : AS) {
if (!Attr.isStringAttribute()) {
if (!AttrStr.empty()) AttrStr += ' ';
- AttrStr += Attr.getAsString();
+ AttrStr += Attr.getAsString(&F->getParent()->getTargetTriple(), false);
}
}
@@ -4983,8 +4983,9 @@ void AssemblyWriter::printMDNodeBody(const MDNode *Node) {
}
void AssemblyWriter::writeAttribute(const Attribute &Attr, bool InAttrGroup) {
+ llvm::Triple *TT;
if (!Attr.isTypeAttribute()) {
- Out << Attr.getAsString(InAttrGroup);
+ Out << Attr.getAsString(TT, InAttrGroup);
return;
}
@@ -5005,7 +5006,7 @@ void AssemblyWriter::writeAttributeSet(const AttributeSet &AttrSet,
}
}
-void AssemblyWriter::writeAllAttributeGroups() {
+void AssemblyWriter::writeAllAttributeGroups(const Triple *TT) {
std::vector<std::pair<AttributeSet, unsigned>> asVec;
asVec.resize(Machine.as_size());
@@ -5014,7 +5015,7 @@ void AssemblyWriter::writeAllAttributeGroups() {
for (const auto &I : asVec)
Out << "attributes #" << I.second << " = { "
- << I.first.getAsString(true) << " }\n";
+ << I.first.getAsString(TT, true) << " }\n";
}
void AssemblyWriter::printUseListOrder(const Value *V,
diff --git a/llvm/lib/IR/AttributeImpl.h b/llvm/lib/IR/AttributeImpl.h
index 91ba0ab8bc969..930000fdcd1ce 100644
--- a/llvm/lib/IR/AttributeImpl.h
+++ b/llvm/lib/IR/AttributeImpl.h
@@ -343,7 +343,8 @@ class AttributeSetNode final
MemoryEffects getMemoryEffects() const;
CaptureInfo getCaptureInfo() const;
FPClassTest getNoFPClass() const;
- std::string getAsString(bool InAttrGrp) const;
+ std::string getAsString(const Triple *TT = nullptr,
+ bool InAttrGrp = false) const;
Type *getAttributeType(Attribute::AttrKind Kind) const;
using iterator = const Attribute *;
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index 726a3d8dd906f..df0cc1462dc9c 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -545,7 +545,7 @@ static const char *getModRefStr(ModRefInfo MR) {
llvm_unreachable("Invalid ModRefInfo");
}
-std::string Attribute::getAsString(bool InAttrGrp) const {
+std::string Attribute::getAsString(const Triple *TT, bool InAttrGrp) const {
if (!pImpl) return {};
if (isEnumAttribute())
@@ -675,10 +675,10 @@ std::string Attribute::getAsString(bool InAttrGrp) const {
case IRMemLocation::Other:
llvm_unreachable("This is represented as the default access kind");
case IRMemLocation::TargetMem0:
- OS << "target_mem0: ";
+ OS << TT->getTargetMemLocName(static_cast<Triple::TargetMemLoc>(Loc));
break;
case IRMemLocation::TargetMem1:
- OS << "target_mem1: ";
+ OS << TT->getTargetMemLocName(static_cast<Triple::TargetMemLoc>(Loc));
break;
}
OS << getModRefStr(MR);
@@ -1242,8 +1242,8 @@ FPClassTest AttributeSet::getNoFPClass() const {
return SetNode ? SetNode->getNoFPClass() : fcNone;
}
-std::string AttributeSet::getAsString(bool InAttrGrp) const {
- return SetNode ? SetNode->getAsString(InAttrGrp) : "";
+std::string AttributeSet::getAsString(const Triple *TT, bool InAttrGrp) const {
+ return SetNode ? SetNode->getAsString(TT, InAttrGrp) : "";
}
bool AttributeSet::hasParentContext(LLVMContext &C) const {
@@ -1266,7 +1266,7 @@ AttributeSet::iterator AttributeSet::end() const {
LLVM_DUMP_METHOD void AttributeSet::dump() const {
dbgs() << "AS =\n";
dbgs() << " { ";
- dbgs() << getAsString(true) << " }\n";
+ dbgs() << getAsString(nullptr, true) << " }\n";
}
#endif
@@ -1444,12 +1444,13 @@ FPClassTest AttributeSetNode::getNoFPClass() const {
return fcNone;
}
-std::string AttributeSetNode::getAsString(bool InAttrGrp) const {
+std::string AttributeSetNode::getAsString(const Triple *TT,
+ bool InAttrGrp) const {
std::string Str;
for (iterator I = begin(), E = end(); I != E; ++I) {
if (I != begin())
Str += ' ';
- Str += I->getAsString(InAttrGrp);
+ Str += I->getAsString(TT, InAttrGrp);
}
return Str;
}
@@ -2044,7 +2045,7 @@ MemoryEffects AttributeList::getMemoryEffects() const {
}
std::string AttributeList::getAsString(unsigned Index, bool InAttrGrp) const {
- return getAttributes(Index).getAsString(InAttrGrp);
+ return getAttributes(Index).getAsString(nullptr, InAttrGrp);
}
AttributeSet AttributeList::getAttributes(unsigned Index) const {
diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp
index e6a9eedab5954..bc5ddc1b6a756 100644
--- a/llvm/lib/TargetParser/Triple.cpp
+++ b/llvm/lib/TargetParser/Triple.cpp
@@ -2379,6 +2379,29 @@ ExceptionHandling Triple::getDefaultExceptionHandling() const {
return ExceptionHandling::None;
}
+StringRef Triple::aarch64GetTargetMemLocName(Triple::TargetMemLoc Kind) const {
+ switch (Kind) {
+ case TargetMemLoc::TargetMem0:
+ return "aarch64_fprm: ";
+ case TargetMemLoc::TargetMem1:
+ return "aarch64_za: ";
+ }
+}
+
+StringRef Triple::getTargetMemLocName(TargetMemLoc Kind) const {
+
+ if (isAArch64())
+ return aarch64GetTargetMemLocName(Kind);
+
+ switch (Kind) {
+ case TargetMemLoc::TargetMem0:
+ return "target_mem0: ";
+ case TargetMemLoc::TargetMem1:
+ return "target_mem1: ";
+ }
+ return "unkown";
+}
+
// HLSL triple environment orders are relied on in the front end
static_assert(Triple::Vertex - Triple::Pixel == 1,
"incorrect HLSL stage order");
diff --git a/llvm/test/Assembler/aarch64-memory-attribute.ll b/llvm/test/Assembler/aarch64-memory-attribute.ll
new file mode 100644
index 0000000000000..48f05ec9dec8a
--- /dev/null
+++ b/llvm/test/Assembler/aarch64-memory-attribute.ll
@@ -0,0 +1,35 @@
+; RUN: llvm-as < %s | llvm-dis | FileCheck %s
+
+target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
+target triple = "aarch64"
+
+; CHECK: Function Attrs: memory(aarch64_za: write)
+; CHECK: @fn_inaccessiblemem_write_aarch64_za() [[ATTR0:#.*]]
+declare void @fn_inaccessiblemem_write_aarch64_za()
+ memory(aarch64_za: write)
+
+; CHECK: Function Attrs: memory(aarch64_za: read)
+; CHECK: @fn_inaccessiblemem_read_aarch64_za() [[ATTR1:#.*]]
+declare void @fn_inaccessiblemem_read_aarch64_za()
+ memory(aarch64_za: read)
+
+; CHECK: Function Attrs: memory(aarch64_fprm: write)
+; CHECK: @fn_inaccessiblemem_write_aarch64_fpmr() [[ATTR2:#.*]]
+declare void @fn_inaccessiblemem_write_aarch64_fpmr()
+ memory(aarch64_fpmr: write)
+
+; CHECK: ; Function Attrs: memory(aarch64_fprm: read)
+; CHECK: @fn_inaccessiblemem_read_aarch64_fpmr() [[ATTR3:#.*]]
+declare void @fn_inaccessiblemem_read_aarch64_fpmr()
+ memory(aarch64_fpmr: read)
+
+; CHECK: Function Attrs: memory(aarch64_fprm: read, aarch64_za: write)
+; CHECK: @fn_inaccessiblemem_read_aarch64_fpmr_write_aarch64_za() [[ATTR4:#.*]]
+declare void @fn_inaccessiblemem_read_aarch64_fpmr_write_aarch64_za()
+ memory(aarch64_fpmr: read, aarch64_za: write)
+
+; CHECK: attributes [[ATTR0]] = { memory(aarch64_za: write) }
+; CHECK: attributes [[ATTR1]] = { memory(aarch64_za: read) }
+; CHECK: attributes [[ATTR2]] = { memory(aarch64_fprm: write) }
+; CHECK: attributes [[ATTR3]] = { memory(aarch64_fprm: read) }
+; CHECK: attributes [[ATTR4]] = { memory(aarch64_fprm: read, aarch64_za: write) }
>From 7fab0dcdd4eccf45ef92f32a06433cbc139b3089 Mon Sep 17 00:00:00 2001
From: CarolineConcatto <caroline.concatto at arm.com>
Date: Wed, 4 Feb 2026 19:55:57 +0000
Subject: [PATCH 2/2] Address review comments
---
llvm/include/llvm/AsmParser/LLToken.h | 4 ---
llvm/include/llvm/TargetParser/Triple.h | 4 +--
llvm/lib/AsmParser/LLLexer.cpp | 2 --
llvm/lib/AsmParser/LLParser.cpp | 2 --
llvm/lib/IR/AsmWriter.cpp | 2 +-
llvm/lib/TargetParser/Triple.cpp | 28 ++++++++++-------
.../Assembler/aarch64-memory-attribute.ll | 30 +++++++++----------
7 files changed, 35 insertions(+), 37 deletions(-)
diff --git a/llvm/include/llvm/AsmParser/LLToken.h b/llvm/include/llvm/AsmParser/LLToken.h
index 91d4621b85a42..24f84cfa09e34 100644
--- a/llvm/include/llvm/AsmParser/LLToken.h
+++ b/llvm/include/llvm/AsmParser/LLToken.h
@@ -210,10 +210,6 @@ enum Kind {
kw_target_mem1,
kw_errnomem,
- // Target Specific Memory attributes
- kw_aarch64_fpmr,
- kw_aarch64_za,
-
// Legacy attributes:
kw_argmemonly,
kw_inaccessiblememonly,
diff --git a/llvm/include/llvm/TargetParser/Triple.h b/llvm/include/llvm/TargetParser/Triple.h
index c8e2fb7c505ea..bb32156c27509 100644
--- a/llvm/include/llvm/TargetParser/Triple.h
+++ b/llvm/include/llvm/TargetParser/Triple.h
@@ -1235,9 +1235,9 @@ class Triple {
/// Tests if the environment supports dllimport/export annotations.
bool hasDLLImportExport() const { return isOSWindows() || isPS(); }
- StringRef aarch64GetTargetMemLocName(TargetMemLoc Kind) const;
+ StringRef getAArch64TargetMemLocName(TargetMemLoc Kind) const;
- StringRef getTargetMemLocName(TargetMemLoc Kind) const;
+ std::string getTargetMemLocName(TargetMemLoc Kind) const;
/// @}
/// @name Mutators
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp
index d116d6ec9e753..4e7e31da09a52 100644
--- a/llvm/lib/AsmParser/LLLexer.cpp
+++ b/llvm/lib/AsmParser/LLLexer.cpp
@@ -719,8 +719,6 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(address);
KEYWORD(provenance);
KEYWORD(read_provenance);
- KEYWORD(aarch64_fpmr);
- KEYWORD(aarch64_za);
// nofpclass attribute
KEYWORD(all);
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 7ae8a49086d98..068b52fcf0995 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -2577,10 +2577,8 @@ static std::optional<MemoryEffects::Location> keywordToLoc(lltok::Kind Tok) {
case lltok::kw_errnomem:
return IRMemLocation::ErrnoMem;
case lltok::kw_target_mem0:
- case lltok::kw_aarch64_fpmr:
return IRMemLocation::TargetMem0;
case lltok::kw_target_mem1:
- case lltok::kw_aarch64_za:
return IRMemLocation::TargetMem1;
default:
return std::nullopt;
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 0e9b6bb63e81b..8d080b4ddf6b3 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -4983,7 +4983,7 @@ void AssemblyWriter::printMDNodeBody(const MDNode *Node) {
}
void AssemblyWriter::writeAttribute(const Attribute &Attr, bool InAttrGroup) {
- llvm::Triple *TT;
+ llvm::Triple *TT = nullptr;
if (!Attr.isTypeAttribute()) {
Out << Attr.getAsString(TT, InAttrGroup);
return;
diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp
index bc5ddc1b6a756..fbc8849ebd0a8 100644
--- a/llvm/lib/TargetParser/Triple.cpp
+++ b/llvm/lib/TargetParser/Triple.cpp
@@ -2379,27 +2379,33 @@ ExceptionHandling Triple::getDefaultExceptionHandling() const {
return ExceptionHandling::None;
}
-StringRef Triple::aarch64GetTargetMemLocName(Triple::TargetMemLoc Kind) const {
+StringRef Triple::getAArch64TargetMemLocName(Triple::TargetMemLoc Kind) const {
switch (Kind) {
+ default:
+ return "";
case TargetMemLoc::TargetMem0:
- return "aarch64_fprm: ";
+ return "/*aarch64_fpmr*/ ";
case TargetMemLoc::TargetMem1:
- return "aarch64_za: ";
+ return "/*aarch64_za:*/ ";
}
}
-StringRef Triple::getTargetMemLocName(TargetMemLoc Kind) const {
-
- if (isAArch64())
- return aarch64GetTargetMemLocName(Kind);
-
+std::string Triple::getTargetMemLocName(TargetMemLoc Kind) const {
+ std::string OS;
switch (Kind) {
+ default:
+ OS += "unknown";
+ break;
case TargetMemLoc::TargetMem0:
- return "target_mem0: ";
+ OS += "target_mem0: ";
+ break;
case TargetMemLoc::TargetMem1:
- return "target_mem1: ";
+ OS += "target_mem1: ";
+ break;
}
- return "unkown";
+ if (isAArch64())
+ OS += getAArch64TargetMemLocName(Kind);
+ return OS;
}
// HLSL triple environment orders are relied on in the front end
diff --git a/llvm/test/Assembler/aarch64-memory-attribute.ll b/llvm/test/Assembler/aarch64-memory-attribute.ll
index 48f05ec9dec8a..012d998f9c45c 100644
--- a/llvm/test/Assembler/aarch64-memory-attribute.ll
+++ b/llvm/test/Assembler/aarch64-memory-attribute.ll
@@ -3,33 +3,33 @@
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64"
-; CHECK: Function Attrs: memory(aarch64_za: write)
+; CHECK: Function Attrs: memory(target_mem1: /*aarch64_za:*/ write)
; CHECK: @fn_inaccessiblemem_write_aarch64_za() [[ATTR0:#.*]]
declare void @fn_inaccessiblemem_write_aarch64_za()
- memory(aarch64_za: write)
+ memory(target_mem1: /*aarch64_za:*/ write)
-; CHECK: Function Attrs: memory(aarch64_za: read)
+; CHECK: Function Attrs: memory(target_mem1: /*aarch64_za:*/ read)
; CHECK: @fn_inaccessiblemem_read_aarch64_za() [[ATTR1:#.*]]
declare void @fn_inaccessiblemem_read_aarch64_za()
- memory(aarch64_za: read)
+ memory(target_mem1: /*aarch64_za:*/ read)
-; CHECK: Function Attrs: memory(aarch64_fprm: write)
+; CHECK: Function Attrs: memory(target_mem0: /*aarch64_fpmr*/ write)
; CHECK: @fn_inaccessiblemem_write_aarch64_fpmr() [[ATTR2:#.*]]
declare void @fn_inaccessiblemem_write_aarch64_fpmr()
- memory(aarch64_fpmr: write)
+ memory(target_mem0: /*aarch64_fpmr*/ write)
-; CHECK: ; Function Attrs: memory(aarch64_fprm: read)
+; CHECK: ; Function Attrs: memory(target_mem0: /*aarch64_fpmr*/ read)
; CHECK: @fn_inaccessiblemem_read_aarch64_fpmr() [[ATTR3:#.*]]
declare void @fn_inaccessiblemem_read_aarch64_fpmr()
- memory(aarch64_fpmr: read)
+ memory(target_mem0: /*aarch64_fpmr*/ read)
-; CHECK: Function Attrs: memory(aarch64_fprm: read, aarch64_za: write)
+; CHECK: Function Attrs: memory(target_mem0: /*aarch64_fpmr*/ read, target_mem1: /*aarch64_za:*/ write)
; CHECK: @fn_inaccessiblemem_read_aarch64_fpmr_write_aarch64_za() [[ATTR4:#.*]]
declare void @fn_inaccessiblemem_read_aarch64_fpmr_write_aarch64_za()
- memory(aarch64_fpmr: read, aarch64_za: write)
+ memory(target_mem0: /*aarch64_fpmr*/ read, target_mem1: /*aarch64_za:*/ write)
-; CHECK: attributes [[ATTR0]] = { memory(aarch64_za: write) }
-; CHECK: attributes [[ATTR1]] = { memory(aarch64_za: read) }
-; CHECK: attributes [[ATTR2]] = { memory(aarch64_fprm: write) }
-; CHECK: attributes [[ATTR3]] = { memory(aarch64_fprm: read) }
-; CHECK: attributes [[ATTR4]] = { memory(aarch64_fprm: read, aarch64_za: write) }
+; CHECK: attributes [[ATTR0]] = { memory(target_mem1: /*aarch64_za:*/ write) }
+; CHECK: attributes [[ATTR1]] = { memory(target_mem1: /*aarch64_za:*/ read) }
+; CHECK: attributes [[ATTR2]] = { memory(target_mem0: /*aarch64_fpmr*/ write) }
+; CHECK: attributes [[ATTR3]] = { memory(target_mem0: /*aarch64_fpmr*/ read) }
+; CHECK: attributes [[ATTR4]] = { memory(target_mem0: /*aarch64_fpmr*/ read, target_mem1: /*aarch64_za:*/ write) }
More information about the llvm-commits
mailing list