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/Target/X86/X86ISelLowering.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/Target/X86/X86ISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 1554ee83afd..067ad895474 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -26712,7 +26712,7 @@ void X86TargetLowering::computeKnownBitsForTargetNode(const SDValue Op, case X86ISD::VSRLI: { if (auto *ShiftImm = dyn_cast<ConstantSDNode>(Op.getOperand(1))) { if (ShiftImm->getAPIntValue().uge(VT.getScalarSizeInBits())) { - KnownZero = APInt::getAllOnesValue(BitWidth); + KnownZero.setAllBits(); break; } |