From c5de42f38f5c536d69d5b51c0e6230261dec8ee1 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 12 Apr 2017 18:39:27 +0000 Subject: [PATCH] [SelectionDAG] Use APInt move assignment to avoid 2 memory allocations and copies when bit width is larger than 64-bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300091 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/TargetLowering.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 034591a00fe..c2a4b55ee1b 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -731,8 +731,8 @@ bool TargetLowering::SimplifyDemandedBits(SDValue Op, } } - KnownZero = KnownZeroOut; - KnownOne = KnownOneOut; + KnownZero = std::move(KnownZeroOut); + KnownOne = std::move(KnownOneOut); break; case ISD::SELECT: if (SimplifyDemandedBits(Op.getOperand(2), NewMask, KnownZero,