[PATCH] D37640: [GISel]: Fix generation of illegal COPYs (of different sizes) during CallLowering

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 11:27:49 PDT 2017


aditya_nandakumar marked 2 inline comments as done.
aditya_nandakumar added inline comments.


================
Comment at: lib/CodeGen/MachineVerifier.cpp:953
+    unsigned SrcSize =
+        RegisterBankInfo::getSizeInBits(SrcOp.getReg(), *MRI, *TRI);
+    if (DstSize != SrcSize)
----------------
qcolombet wrote:
> Using the type of the vregs, MachineRegisterInfo::getType, should eliminate the dependency on RegisterBankInfo.
This part has moved to https://reviews.llvm.org/D37775
MRI->getType would only give me valid types for generic virtual registers.
For cases such as %0(s16) = COPY %W0, I'd still need to get the size of W0. If dependency is the issue, I can certainly do what RegisterBankInfo::getSizeInBits() is doing, but that's duplicating work.


https://reviews.llvm.org/D37640





More information about the llvm-commits mailing list