[PATCH] D104115: [SVE] Fix PromoteIntRes_TRUNCATE not to call getVectorNumElements

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 11 06:43:35 PDT 2021


sdesmalen added a comment.

The change looks fine to me, just have a nit for the test.



================
Comment at: llvm/test/CodeGen/AArch64/sve-trunc.ll:196
+  %1 = trunc <vscale x 4 x i64> %0 to <vscale x 4 x i16>
+  %2 = bitcast i16* undef to <vscale x 4 x i16>*
+  store <vscale x 4 x i16> %1, <vscale x 4 x i16>* %2, align 2
----------------
nit: instead of using `undef`, can you add an extra argument to the function, `i16 * %ptr`? That way the test is more stable, since it always has to use `x0` because of the ABI rules on parameter passing. For `undef`, the compiler is free to choose any value/register.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104115



More information about the llvm-commits mailing list