[SDAG] Remove single-result restriction on commutative CSE
authorItay Bookstein <ibookstein@gmail.com>
Wed, 13 Jul 2022 17:29:48 +0000 (20:29 +0300)
committerItay Bookstein <ibookstein@gmail.com>
Mon, 18 Jul 2022 16:19:13 +0000 (19:19 +0300)
commit2570f226d1547d1937b4acb8f070736399de5132
tree2d7204efb9d74e4f78228d31d530965d69485312
parentd7f2a633714471e78684cefea0291fbcdc1c3e14
[SDAG] Remove single-result restriction on commutative CSE

The DAG Combiner unnecessarily restricts commutative CSE
to nodes with a single result value. This commit removes
that restriction.

Signed-off-by: Itay Bookstein <ibookstein@gmail.com>
Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D129666
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/dagcombine-cse.ll
llvm/test/CodeGen/X86/smul-with-overflow.ll
llvm/test/CodeGen/X86/smulo-128-legalisation-lowering.ll