[llvm] [SelectionDAGISel] Don't merge input chains if it would put a token factor in the way of a glue. (PR #167805)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 13 07:25:13 PST 2025


topperc wrote:

> Can this be fixed by adjusting SelectionDAGISel::IsLegalToFold ? It seems to have a check for something similar.

IsLegalToFold is only called for the load node. The Glue and other chain are on the call. We could have IsLegalToFold do additional checks on the root node by checking that it has a chain operand. But in theory the other chain could be another node that isn't the root.

https://github.com/llvm/llvm-project/pull/167805


More information about the llvm-commits mailing list