diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-04-28 04:57:59 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-04-28 04:57:59 +0000 |
commit | 0e03e74e950be8e0946530ab48ce3ab2709b2272 (patch) | |
tree | c45e150990fe1ecd575cf2028aab96dce9e30e5c /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 0d91d6a4ed3f88f5b6039158163a1fe09ceffb62 (diff) | |
download | bcm5719-llvm-0e03e74e950be8e0946530ab48ce3ab2709b2272.tar.gz bcm5719-llvm-0e03e74e950be8e0946530ab48ce3ab2709b2272.zip |
[SelectionDAG] Use various APInt methods to reduce temporary APInt creation
This patch uses various APInt methods to reduce the number of temporary APInts. These were all found while working through converting SelectionDAG's computeKnownBits to also use the KnownBits struct recently added to the ValueTracking version.
llvm-svn: 301618
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index e21204dbb96..09fb341563a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -1934,7 +1934,7 @@ bool SelectionDAGISel::CheckOrMask(SDValue LHS, ConstantSDNode *RHS, CurDAG->computeKnownBits(LHS, KnownZero, KnownOne); // If all the missing bits in the or are already known to be set, match! - if ((NeededMask & KnownOne) == NeededMask) + if (NeededMask.isSubsetOf(KnownOne)) return true; // TODO: check to see if missing bits are just not demanded. |