================
@@ -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");
----------------
lucas-rami wrote:

Thanks for the catch. These asserts are actually redundant with the one in 
`Rematerializer::Reg::eraseUser` that is called below (which doesn't do a 
double map lookup), so I removed them completely.

https://github.com/llvm/llvm-project/pull/184339
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to