[PATCH] D106879: GlobalISel: Fix infinite loop in legalization artifact combiner

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 27 08:53:08 PDT 2021


arsenm added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:770
         Register DefReg = MI.getReg(DefIdx);
+        if (MRI.use_empty(DefReg))
+          continue;
----------------
Probably should be use_nodbg_empty


================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/bug-legalization-artifact-combiner-dead-def.ll:21
+  ret void
+}
----------------
Should also add a MIR test. Also should add a case where there is only a debug info user


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

https://reviews.llvm.org/D106879



More information about the llvm-commits mailing list