diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-11-10 21:57:42 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-11-10 21:57:42 +0000 |
commit | fe3a54371dda450d8b687f918d9db483f32e80d3 (patch) | |
tree | 9a77f5d27c1c846507116b3392d6f0490147c52e /llvm/lib/CodeGen/SelectionDAG | |
parent | 7e0a4b8fdf4de0f6bb62b9d6baf80f1037791d72 (diff) | |
download | bcm5719-llvm-fe3a54371dda450d8b687f918d9db483f32e80d3.tar.gz bcm5719-llvm-fe3a54371dda450d8b687f918d9db483f32e80d3.zip |
[SelectionDAG] Add support for splatted vectors in SUB opcode
llvm-svn: 286509
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 15dbacdfb4a..446067aeb8d 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2414,7 +2414,7 @@ void SelectionDAG::computeKnownBits(SDValue Op, APInt &KnownZero, break; case ISD::SUB: { - if (ConstantSDNode *CLHS = dyn_cast<ConstantSDNode>(Op.getOperand(0))) { + if (ConstantSDNode *CLHS = isConstOrConstSplat(Op.getOperand(0))) { // We know that the top bits of C-X are clear if X contains less bits // than C (i.e. no wrap-around can happen). For example, 20-X is // positive if we can prove that X is >= 0 and < 16. |