Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MCP] Skip invalidating constant regs during forward propagation
Before this patch, redundant COPY couldn't be removed for the following case: %reg1 = COPY %const-reg ... // No use of %reg1 but there is a def/use of %const-reg %reg2 = COPY killed %reg1 where this can be optimized to: ... // No use of %reg1 but there is a def/use of %const-reg %reg2 = COPY %const-reg This patch allows for such optimization by not invalidating constant registers. This is safe even where constant registers are defined, as architectures like AArch64 and RISCV replace a dead definition of a GPR with a zero constant register for certain instructions. Upstream PR: llvm/llvm-project#111129 Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
- Loading branch information