[PATCH] D155087: [RegAlloc] Fix assertion failure caused by inline assembly

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 14:17:45 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/RegAllocFast.cpp:941
+      setPhysReg(MI, MO, *AllocationOrder.begin());
+      return true;
+    }
----------------
bryanpkc wrote:
> Why doesn't this return the result of `setPhysReg`?
> 
> You should also add a comment to explain that since there was an error finding a suitable register for `LRI`, we just pick a register at random and bail out of the function immediately.
Should also guard against AllocationOrder being empty which can happen if all the registers become reserved, I guess you just have to use noreg at that point


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155087



More information about the llvm-commits mailing list