[PATCH] D138591: [AAch64] Don't treat SVE scalable extends as free widening instructions

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 03:51:57 PST 2022


sdesmalen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1637
   // uaddl, saddw, etc.), it may be free.
-  if (I && I->hasOneUser()) {
+  if (I && I->hasOneUser() && !isa<ScalableVectorType>(Src)) {
     auto *SingleUser = cast<Instruction>(*I->user_begin());
----------------
It seems that the implementation of isWideningInstruction is historically a bit NEON specific and although SVE2 adds similar instructions, they work a little bit different and LLVM doesn't currently make use of them.
It might make more sense to add this condition to `isWideningInstruction` instead and possibly add a FIXME to enable this in the future when LLVM does have support for it. What do you think?


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

https://reviews.llvm.org/D138591



More information about the llvm-commits mailing list