[llvm-branch-commits] [llvm] [CodeGen] Allow rematerializer to rematerialize at the end of a block (PR #184339)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Mar 24 05:36:38 PDT 2026
================
@@ -206,9 +211,12 @@ void Rematerializer::reviveRegIfDead(RegisterIdx RootIdx) {
}
void Rematerializer::transferUser(RegisterIdx FromRegIdx, RegisterIdx ToRegIdx,
- MachineInstr &UserMI) {
+ unsigned UserRegion, MachineInstr &UserMI) {
+ assert(getReg(FromRegIdx).Uses.contains(UserRegion) && "no user in region");
+ assert(getReg(FromRegIdx).Uses.at(UserRegion).contains(&UserMI) &&
+ "not a region user");
----------------
arsenm wrote:
Avoid double map lookup in assert
https://github.com/llvm/llvm-project/pull/184339
More information about the llvm-branch-commits
mailing list