Skip to content

[AArch64] Add support for MSVC-style mangling for SVE #196170

Closed

Description

@efriedma-quic

The latest MSVC release candidate has support for SVE, and with it a set of new SVE mangling patterns. We should mangle like MSVC instead of using the manglings we invented before (in #141887).

Example code:

#include <arm_sve.h>
void f(svint32_t x) {}

Latest MSVC produces the mangled symbol ?f@@YAX$$_CD@Z.

The relevant code is in MicrosoftCXXNameMangler::mangleType; replace the existing code which does #include "clang/Basic/AArch64ACLETypes.def".

(As a followup, we should also add demangling support in llvm/lib/Demangle/MicrosoftDemangle.cpp.)

Activity

  1. added
    good first issuehttps://github.com/llvm/llvm-project/contribute
    clang:codegenIR generation bugs: mangling, exceptions, etc.
    on May 6, 2026
  2. edwardnvv57k commented on May 6, 2026

    @edwardnvv57k
    Contributor

    I'm working on this.

  3. llvmorg-github-actions commented on May 6, 2026

    @llvmorg-github-actions

    Hi!

    This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:

    1. Check that no other contributor is working on this issue. If someone is assigned to the issue or claimed to be working on it, ping the person. After one week without a response, the assignee may be changed.
    2. Leave a comment indicating that you are working on the issue, or just create a pull request after following the steps below. Mention this issue in the description of the pull request.
    3. Fix the issue locally. Be aware that LLVM's AI policy forbids the use of AI tools to fix good first issues since it squanders a learning opportunity. Using LLMs to search and learn is permitted, since the goal is learning.
    4. Run the test suite locally. Remember that the subdirectories under test/ create fine-grained testing targets, so you can e.g. use make check-clang-ast to only run Clang's AST tests.
    5. Create a Git commit.
    6. Run git clang-format HEAD~1 to format your changes.
    7. Open a pull request to the upstream repository on GitHub. Detailed instructions can be found in GitHub's documentation. Mention this issue in the description of the pull request.

    If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below.

  4. llvmorg-github-actions commented on May 6, 2026

    @llvmorg-github-actions

    @llvm/issue-subscribers-good-first-issue

    Author: Eli Friedman (efriedma-quic)

    Details The latest MSVC release candidate has support for SVE, and with it a set of new SVE mangling patterns. We should mangle like MSVC instead of using the manglings we invented before (in #141887).

    Example code:

    #include &lt;arm_sve.h&gt;
    void f(svint32_t x) {}
    

    Latest MSVC produces the mangled symbol ?f@@<!-- -->YAX$$_CD@<!-- -->Z.

    The relevant code is in MicrosoftCXXNameMangler::mangleType; replace the existing code which does #include "clang/Basic/AArch64ACLETypes.def".

    (As a followup, we should also add demangling support in llvm/lib/Demangle/MicrosoftDemangle.cpp.)

  5. llvmorg-github-actions commented on May 6, 2026

    @llvmorg-github-actions

    @llvm/issue-subscribers-backend-aarch64

    Author: Eli Friedman (efriedma-quic)

    Details The latest MSVC release candidate has support for SVE, and with it a set of new SVE mangling patterns. We should mangle like MSVC instead of using the manglings we invented before (in #141887).

    Example code:

    #include &lt;arm_sve.h&gt;
    void f(svint32_t x) {}
    

    Latest MSVC produces the mangled symbol ?f@@<!-- -->YAX$$_CD@<!-- -->Z.

    The relevant code is in MicrosoftCXXNameMangler::mangleType; replace the existing code which does #include "clang/Basic/AArch64ACLETypes.def".

    (As a followup, we should also add demangling support in llvm/lib/Demangle/MicrosoftDemangle.cpp.)

  6. llvmorg-github-actions commented on May 6, 2026

    @llvmorg-github-actions

    @llvm/issue-subscribers-clang-codegen

    Author: Eli Friedman (efriedma-quic)

    Details The latest MSVC release candidate has support for SVE, and with it a set of new SVE mangling patterns. We should mangle like MSVC instead of using the manglings we invented before (in #141887).

    Example code:

    #include &lt;arm_sve.h&gt;
    void f(svint32_t x) {}
    

    Latest MSVC produces the mangled symbol ?f@@<!-- -->YAX$$_CD@<!-- -->Z.

    The relevant code is in MicrosoftCXXNameMangler::mangleType; replace the existing code which does #include "clang/Basic/AArch64ACLETypes.def".

    (As a followup, we should also add demangling support in llvm/lib/Demangle/MicrosoftDemangle.cpp.)

  7. added a commit that references this issue on May 26, 2026
    386e356
  8. added a commit that references this issue on Sep 22, 2026
  9. added a commit that references this issue on Oct 4, 2026
  10. added a commit that references this issue on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:AArch64clang:codegenIR generation bugs: mangling, exceptions, etc.good first issuehttps://github.com/llvm/llvm-project/contribute

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions