[PATCH] D127281: [Greedy RegAlloc] Fix the handling of split register in last chance re-coloring.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 18:21:27 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:1907
       std::tie(LI, PhysReg) = RecolorStack[I];
-      Matrix->assign(*LI, PhysReg);
+      if (!LI->empty() && !MRI->reg_nodbg_empty(LI->reg()))
+        Matrix->assign(*LI, PhysReg);
----------------
Why are both checks necessary? Why isn't LI->empty sufficient?


================
Comment at: llvm/test/CodeGen/AArch64/regalloc-last-chance-recolor-with-split.mir:2
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mattr="+reserve-x28" --run-pass=greedy -verify-machineinstrs %s -o - | FileCheck %s
 
----------------
Probably should also run virtregrewriter


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

https://reviews.llvm.org/D127281



More information about the llvm-commits mailing list