summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2018-07-07 17:33:48 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2018-07-07 17:33:48 +0000
commit0a36daa5a26bbea217898ae65afc4d3d046da50c (patch)
tree7b02a1d6519b76ba08c4907d37db88cf879ab519 /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
parentc1d1944053fa1b86c2d8d626fa740d4100298fa3 (diff)
downloadbcm5719-llvm-0a36daa5a26bbea217898ae65afc4d3d046da50c.tar.gz
bcm5719-llvm-0a36daa5a26bbea217898ae65afc4d3d046da50c.zip
Use const APInt& to avoid extra copy. NFCI.
As discussed on D48825. llvm-svn: 336491
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index f1526a4ae46..76e3cd6b753 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -1461,7 +1461,7 @@ bool TargetLowering::SimplifyDemandedVectorElts(
SDValue Sub = Op.getOperand(1);
EVT SubVT = Sub.getValueType();
unsigned NumSubElts = SubVT.getVectorNumElements();
- APInt Idx = cast<ConstantSDNode>(Op.getOperand(2))->getAPIntValue();
+ const APInt& Idx = cast<ConstantSDNode>(Op.getOperand(2))->getAPIntValue();
if (Idx.uge(NumElts - NumSubElts))
break;
unsigned SubIdx = Idx.getZExtValue();
OpenPOWER on IntegriCloud