[PATCH] D125956: [NOT YET FOR REVIEW][AArch64][LV] Implement AArch64TTIImpl::getRegisterClassForType

Peter Waller via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 05:03:34 PDT 2022


peterwaller-arm added a comment.

A fair point on the vector/fp overlap, will consider.



================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:229
+    return Vector ? 1 : 0;
+  return getRegMVTForType(Ty).isVector() ? 1 : 0;
+}
----------------
dmgreen wrote:
> Can this just use the existing TLI->getTypeLegalizationCost call to get the MVT?
As far as I can see, no, because the return value of `getTypeLegalizationCost` is wrong, deriving its value from `getValueType`. This just does `EVT::getVectorVT(Ty->getContext(), EVT::getEVT(EltTy, false),` under the hood, which is different than `TLI->getRegisterType`, which uses information derived from `computeRegisterProperties`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125956



More information about the llvm-commits mailing list