[llvm-branch-commits] [CodeGen] Prevent register coalescer rematerialization based on target (PR #148430)

Tomer Shafir via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Jul 13 06:27:04 PDT 2025


https://github.com/tomershafir created https://github.com/llvm/llvm-project/pull/148430

This change makes the register coalescer prevent rematerialization of a trivial def for a move instruction, if the target guides against it, based on the new target hook `shouldReMaterializeTrivialRegDef`. The filter is appended to the exiting logic. The patch includes isolated MIR tests for all register classes supported, and fixes existing tests.





More information about the llvm-branch-commits mailing list