[SelectionDAG][X86] Use disjoint flag in SelectionDAG::isADDLike. (#76847)
commit47a1704ac94c8aeb1aa7e0fc438ff99d36b632c6
authorCraig Topper <craig.topper@sifive.com>
Wed, 3 Jan 2024 19:54:29 +0000 (3 11:54 -0800)
committerGitHub <noreply@github.com>
Wed, 3 Jan 2024 19:54:29 +0000 (3 11:54 -0800)
tree639c34cee6662c16f390dbdbea680fec996b0768
parent7fbc1de9896029636dd572a692ee90ba88285943
[SelectionDAG][X86] Use disjoint flag in SelectionDAG::isADDLike. (#76847)

Keep the haveNoCommonBitsSet check because we haven't started inferring
the flag yet.

I've added tests for two transforms, but these are not the only
transforms that use isADDLike.
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/X86/addsub-constant-folding.ll
llvm/test/CodeGen/X86/or-lea.ll