LoopUnroll: Use the optsize threshold for minsize as well
authorJustin Bogner <mail@justinbogner.com>
Mon, 11 Jan 2016 22:39:43 +0000 (22:39 +0000)
committerJustin Bogner <mail@justinbogner.com>
Mon, 11 Jan 2016 22:39:43 +0000 (22:39 +0000)
commit2ab07ac8fe545b0f65c6981e62384572acae8378
treef411cb7e0309a8f6cb4d3692e4f9a584bbf49599
parent33ad607b8eb24479cf50c7d0df491b03429b086d
LoopUnroll: Use the optsize threshold for minsize as well

Currently we're unrolling loops more in minsize than in optsize, which
means -Oz will have a larger code size than -Os. That doesn't make any
sense.

This resolves the FIXME about this in LoopUnrollPass and extends the
optsize test to make sure we use the smaller threshold for minsize as
well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257402 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopUnrollPass.cpp
test/Transforms/LoopUnroll/partial-unroll-optsize.ll