add a SelectionDAG method to check if no common bits are set in two nodes; NFCI
authorSanjay Patel <spatel@rotateright.com>
Mon, 9 Nov 2015 23:31:38 +0000 (23:31 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 9 Nov 2015 23:31:38 +0000 (23:31 +0000)
commit512052a88e8f1b0bb874f741fe72fb398d12ffbc
tree5e020eaa2ada5d37cd33f8577a00240404348921
parent9df84ef7b9e1a374378d1538a8718f4a17c5a79d
add a SelectionDAG method to check if no common bits are set in two nodes; NFCI

This was suggested in:
http://reviews.llvm.org/D13956

and is a follow-on to:
http://reviews.llvm.org/rL252515
http://reviews.llvm.org/rL252519

This lets us remove logically equivalent/duplicated code from DAGCombiner and X86ISelDAGToDAG.

A corresponding function for IR instructions already exists in ValueTracking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252539 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelDAGToDAG.cpp