Skip to content

[TableGen] Add missing $ before the dag operator name #140969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025

Conversation

anemet
Copy link
Contributor

@anemet anemet commented May 21, 2025

This way the dump output is roundtripable.

This way the dump output is roundtripable.
@llvmbot
Copy link
Member

llvmbot commented May 21, 2025

@llvm/pr-subscribers-tablegen

Author: Adam Nemet (anemet)

Changes

This way the dump output is roundtripable.


Full diff: https://github.com/llvm/llvm-project/pull/140969.diff

2 Files Affected:

  • (modified) llvm/lib/TableGen/Record.cpp (+1-1)
  • (modified) llvm/test/TableGen/usevalname.td (+1-1)
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index 2f991d5fec165..12f5ce6175dbf 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -2786,7 +2786,7 @@ bool DagInit::isConcrete() const {
 std::string DagInit::getAsString() const {
   std::string Result = "(" + Val->getAsString();
   if (ValName)
-    Result += ":" + ValName->getAsUnquotedString();
+    Result += ":$" + ValName->getAsUnquotedString();
   if (!arg_empty()) {
     Result += " ";
     ListSeparator LS;
diff --git a/llvm/test/TableGen/usevalname.td b/llvm/test/TableGen/usevalname.td
index d85b98ac33e64..ab90398cde49c 100644
--- a/llvm/test/TableGen/usevalname.td
+++ b/llvm/test/TableGen/usevalname.td
@@ -20,5 +20,5 @@ multiclass shuffle<Reg RC> {
                                        RC:$src1, RC:$src2))]>;
 }
 
-// CHECK: shufp:src3
+// CHECK: shufp:$src3
 defm ADD : shuffle<VR128>;

@anemet anemet requested review from jurahul and fpetrogalli May 21, 2025 22:41
@anemet anemet merged commit 1a4d588 into llvm:main May 22, 2025
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants