Fix a bug in finding conflicts during rematerialization.
The LRA rematerialization pass now uses the correct mode when identifying register conflicts, preventing incorrect rematerialization.
A bug was corrected in the LRA rematerialization pass where the wrong mode was used when searching for register conflicts, which could lead to incorrect rematerialization. The fix ensures the correct mode is used to find conflicts.
In Details
The reg_overlap_for_remat_p function in lra-remat.cc was using the wrong mode when determining register conflicts during rematerialization. This commit corrects the mode used for regno2, resolving the issue.
For Context
This commit fixes a bug in the register allocation process of the compiler, specifically during rematerialization. Register allocation involves assigning variables to CPU registers for faster access. Rematerialization recomputes values instead of retrieving them from memory. The bug caused the compiler to incorrectly identify conflicts between registers, potentially leading to performance issues or incorrect code. This commit corrects the register conflict detection process, which improves the accuracy and efficiency of code generation.