OSDN Git Service

Teach LSR to optimize away SMAX operations for tripcounts in common
authorDan Gohman <gohman@apple.com>
Mon, 15 Sep 2008 21:22:06 +0000 (21:22 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 15 Sep 2008 21:22:06 +0000 (21:22 +0000)
commitad7321f58a485ae80fe3da1f400aa695e250b1a8
tree57eabe141c7fd8e2d63d5b09e6edd6f75b0b32f1
parent89e9ed379569528f75a29f2367fccc06a39fe201
Teach LSR to optimize away SMAX operations for tripcounts in common
cases.  See the comment above OptimizeSMax for the full story, and
the testcase for an example. This cancels out a pessimization
commonly attributed to indvars, and will allow us to lift some of
the artificial throttles in indvars, rather than add new ones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56230 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/CodeGen/X86/optimize-smax.ll [new file with mode: 0644]