we don't expand only when compiling for minimum code size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274847
91177308-0d34-0410-b5e6-
96231b3b80d8
/// 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));
-; 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 udiv to a mul
; and a shift sequence. As a result, the urem instruction will not be
; expanded to a sequence of umull, lsrs, muls and sub instructions, but
; just a call to __aeabi_uidivmod.