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

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 11:22:03 PDT 2017


qcolombet added a comment.

The AArch64 part looks good to me.



================
Comment at: include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h:549
+    return buildCopy(getDestFromArg(Res), getRegFromArg(Src));
+  }
 
----------------
You can split the patch for those, when you commit.


================
Comment at: include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h:670
+    return buildTrunc(getDestFromArg(Res), getRegFromArg(Src));
+  }
 
----------------
Ditto.


================
Comment at: lib/CodeGen/MachineVerifier.cpp:52
 #include "llvm/Target/TargetSubtargetInfo.h"
+#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
 using namespace llvm;
----------------
This change is problematic because we add a dependency from CodeGen to GlobalISel


================
Comment at: lib/CodeGen/MachineVerifier.cpp:953
+    unsigned SrcSize =
+        RegisterBankInfo::getSizeInBits(SrcOp.getReg(), *MRI, *TRI);
+    if (DstSize != SrcSize)
----------------
Using the type of the vregs, MachineRegisterInfo::getType, should eliminate the dependency on RegisterBankInfo.


https://reviews.llvm.org/D37640





More information about the llvm-commits mailing list