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

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 07:45:36 PDT 2022


dmgreen added a comment.

In D125956#3524706 <https://reviews.llvm.org/D125956#3524706>, @peterwaller-arm wrote:

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

Yeah, it at least deserves to be a separate patch.



================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:229
+    return Vector ? 1 : 0;
+  return getRegMVTForType(Ty).isVector() ? 1 : 0;
+}
----------------
peterwaller-arm wrote:
> 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`.
I would expect getTypeLegalizationCost(..).second to be a scalar type if the original vector was scalarized. It goes via the legalization mechanism in getTypeConversion.


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