[llvm] [InstCombine] Allow freezing multiple operands (PR #154336)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 19 07:41:02 PDT 2025
nikic wrote:
> What caused so much trouble in #145939 is that SelectionDAG is terrible at topological combine order, which was resulting in the replaceUses calls causing infinite loops because the freeze was getting pushed through beyond the recursion depth that some other users (combined later) could see. Is that likely to happen in InstCombine?
No, this is not a problem for InstCombine.
> I've started work on a much tamer version here #152107 - which relies on a separate fold of frozen/unfrozen versions of a node getting merged later on.
This is actually how it works in InstCombine. We do a plain freeze an the operands, and then there's a separate freezeOtherUses() transform.
https://github.com/llvm/llvm-project/pull/154336
More information about the llvm-commits
mailing list