[llvm] Fix #195006 Assembly failure with -save-temps when a function name matches a register name (PR #195538)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat May 9 00:38:30 PDT 2026


================
@@ -344,21 +345,42 @@ static MCRegisterInfo *createAArch64MCRegisterInfo(const Triple &Triple) {
   return X;
 }
 
+// Populate the set of reserved identifiers (register names) that should be
+// quoted when used as symbol names in assembly output.
+static void populateAArch64ReservedIdentifiers(StringSet<> &Set,
+                                                const MCRegisterInfo &MRI) {
+  for (unsigned i = 1, e = MRI.getNumRegs(); i < e; ++i) {
+    if (const char *Name = MRI.getName(i)) {
+      if (Name[0])
----------------
MaskRay wrote:

Needs a rebase after #196699 lands

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


More information about the llvm-commits mailing list