summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorSjoerd Meijer <sjoerd.meijer@arm.com>2016-07-08 14:17:09 +0000
committerSjoerd Meijer <sjoerd.meijer@arm.com>2016-07-08 14:17:09 +0000
commit46c4c3d31cd2ec5ce79615cd3aa0760da9122587 (patch)
tree8cc5abf5f597d8319415ab981ff659217d075188 /llvm/lib/CodeGen/SelectionDAG
parent4f1877fb57d2594b69cfc7622db59ec811bf6382 (diff)
downloadbcm5719-llvm-46c4c3d31cd2ec5ce79615cd3aa0760da9122587.tar.gz
bcm5719-llvm-46c4c3d31cd2ec5ce79615cd3aa0760da9122587.zip
Addressing post-commit comments regarding not expanding UDIV;
we don't expand only when compiling for minimum code size. llvm-svn: 274847
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 456c5498e3c..2931ad276a4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -14516,9 +14516,9 @@ SDValue DAGCombiner::BuildSDIVPow2(SDNode *N) {
/// number.
/// Ref: "Hacker's Delight" or "The PowerPC Compiler Writer's Guide".
SDValue DAGCombiner::BuildUDIV(SDNode *N) {
- // when optimising for size, we don't want to expand a div to a mul and
+ // when optimising for minimum size, we don't want to expand a div to a mul
// and a shift.
- if (ForCodeSize)
+ if (DAG.getMachineFunction().getFunction()->optForMinSize())
return SDValue();
ConstantSDNode *C = isConstOrConstSplat(N->getOperand(1));
OpenPOWER on IntegriCloud