summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-08-14 19:46:15 +0000
committerSanjay Patel <spatel@rotateright.com>2019-08-14 19:46:15 +0000
commitecccf29e6c79a2c899265d3bf192d941dff1d2de (patch)
tree339e8278aa82e5e6048f008c88f3a6cd41f590b6 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent4ee1376dc62600ec8a489e326e8bacebc2f9ac30 (diff)
downloadbcm5719-llvm-ecccf29e6c79a2c899265d3bf192d941dff1d2de.tar.gz
bcm5719-llvm-ecccf29e6c79a2c899265d3bf192d941dff1d2de.zip
[SDAG] move variable closer to use; NFC
llvm-svn: 368905
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 32d71f26110..be41e12b785 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -9003,7 +9003,6 @@ SelectionDAG::matchBinOpReduction(SDNode *Extract, ISD::NodeType &BinOp,
return SDValue();
SDValue Op = Extract->getOperand(0);
- unsigned Stages = Log2_32(Op.getValueType().getVectorNumElements());
// Match against one of the candidate binary ops.
if (llvm::none_of(CandidateBinOps, [Op](ISD::NodeType BinOp) {
@@ -9041,6 +9040,7 @@ SelectionDAG::matchBinOpReduction(SDNode *Extract, ISD::NodeType &BinOp,
// While a partial reduction match would be:
// <2,3,u,u,u,u,u,u>
// <1,u,u,u,u,u,u,u>
+ unsigned Stages = Log2_32(Op.getValueType().getVectorNumElements());
SDValue PrevOp;
for (unsigned i = 0; i < Stages; ++i) {
unsigned MaskEnd = (1 << i);
OpenPOWER on IntegriCloud