[PATCH] D105520: [AArch64][SVE][InstCombine] last{a,b} of a splat vector

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 7 00:13:23 PDT 2021


sdesmalen accepted this revision.
sdesmalen added a comment.
This revision is now accepted and ready to land.

This seems like a nice improvement to me, thanks!



================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:505
+  // lastX(splat(X)) --> X
+  if (auto *SplatVal = getSplatValue(Vec))
+    return IC.replaceInstUsesWith(II, SplatVal);
----------------
The predicate is indeed irrelevant here, if all lanes of the predicate are inactive, then it would extract the first/last element.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105520



More information about the llvm-commits mailing list