[PATCH] D133025: [LLVM][AArch64] Replace aarch64.sve.ldN by aarch64.sve.ldN.sret

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 6 02:38:13 PDT 2022


sdesmalen added inline comments.


================
Comment at: llvm/lib/IR/AutoUpgrade.cpp:561
     }
+    static const Regex LdRegex("^aarch64\\.sve\\.ld[234]\\.nxv[a-z0-9]+");
+    if (LdRegex.match(Name)) {
----------------
Are you sure that the type mangling has been guaranteed at this point? Because the following IR without the type suffix also compiles:

```define <vscale x 32 x i8> @ld2.nxv32i8(<vscale x 16 x i1> %Pg, i8 *%base_ptr) {
%res = call <vscale x 32 x i8> @llvm.aarch64.sve.ld2(<vscale x 16 x i1> %Pg, i8 *%base_ptr)
ret <vscale x 32 x i8> %res
}

declare <vscale x 32 x i8> @llvm.aarch64.sve.ld2(<vscale x 16 x i1>, i8 *)```

I assume you'er doing it to avoid it also matching the `.sret` case, so maybe you can test for either `.nxv[0-9]` or `$`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133025/new/

https://reviews.llvm.org/D133025



More information about the llvm-commits mailing list