[PATCH] D72833: [GlobalISel] Use more MachineIRBuilder helper methods

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 05:45:49 PST 2020


foad marked an inline comment as done.
foad added a comment.

Sorry @arsenm, I updated the patch just before I saw your approval.



================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:1995
+    MIRBuilder.setInsertPt(MIRBuilder.getMBB(), ++MIRBuilder.getInsertPt());
+
     Register HiPart = MRI.createGenericVirtualRegister(Ty);
----------------
In case you were wondering about this hunk: the old code left the G_SMULO/UMULO in place, which defined Res, and also created a new G_MUL, which defined Res. This caused an assertion failure when buildAShr tried to constant fold its arguments, because it wasn't expecting to find more than one definition of Res. Is this a general problem in GlobalISel lowering and is my workaround reasonable?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72833





More information about the llvm-commits mailing list