Files
llvm-project/llvm/lib/CodeGen/Rematerializer.cpp
Lucas Ramirez 77a360663d [CodeGen] Fix incorrect index in rematerialization tracking (#194387)
When deleting the last rematerialization of a register, we should delete
the rematerializer's remat tracking map's entry that corresponds to the
index of the *original* register, not the rematerialized register.

The existing typo has no impact on correctness at the moment because
entries with rematerialized register indices are never created (so there
is nothing to erase), and having an empty set in a value does not break
any code invariant; it just wastes memory.

Assisted-by: Claude Code
2026-04-27 17:12:53 +02:00

31 KiB