[PATCH] D144336: [GlobalISel] Fix DIVREM combine from inserting a divrem before its operands' defs.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 20 03:49:04 PST 2023


arsenm added a comment.

This feels way more complicated than necessary but I don't really have a better suggestion



================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1202
+       II != Second->getIterator(); ++II) {
+    for (auto &MO : II->defs()) {
+      if (RegsToCheck.count(MO.getReg()) && dominates(*First, *II))
----------------
This will miss implicit defs if a non-G_* instruction ends up in the middle somehow 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144336



More information about the llvm-commits mailing list