[llvm] [DAGCombiner] Expose CSE for shifts of logic operations (PR #213091)

Hao Ren via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 13:03:30 PDT 2026


================

----------------
nvidia-moomoo wrote:

The previous statement I was making is wrong. 

It fundamentally goes to the decision that we want to capture the siblings of the root.

The sibling DAGs don't fully contain root's DAG. So when the are re-written, it's not sufficient to return the re-written root. 

We also have to add the rewritten siblings to the DAGcombiner's worklist. The easiest way to implement it is by making `foldShiftOfLogicWithSharedInput` a class method.


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


More information about the llvm-commits mailing list