[PATCH] D92953: [GlobalISel] Base implementation for sret demotion.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 07:58:07 PST 2020


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CallLowering.cpp:578-587
+  for (EVT VT : SplitVTs) {
+    unsigned NumParts =
+        TLI->getNumRegistersForCallingConv(Context, CallConv, VT);
+    MVT RegVT = TLI->getRegisterTypeForCallingConv(Context, CallConv, VT);
+    Type *PartTy = EVT(RegVT).getTypeForEVT(Context);
+
+    for (unsigned I = 0; I < NumParts; ++I) {
----------------
cdevadas wrote:
> arsenm wrote:
> > I think something is off here because this shouldn't depend on the NumRegistersForCallingConv code
> Why do you think so?
> `getNumRegistersForCallingConv` helps here to get the actual number of target registers required for the return type.  
Nevermind, I have this backwards


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92953



More information about the llvm-commits mailing list