[LSR] Generate and use zero extends
authorSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 27 Jul 2015 23:27:51 +0000 (23:27 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 27 Jul 2015 23:27:51 +0000 (23:27 +0000)
commit93b3504aa82db9fe6445306277528d2512d64764
tree6161f20bb53d252067bacb68791c898ae7259dd2
parentc3182d8c4320c9f76fb2cf01178bd6a3d340cb5b
[LSR] Generate and use zero extends

Summary:
If a scale or a base register can be rewritten as "Zext({A,+,1})" then
LSR will now consider a formula of that form in its normal cost
computation.

Depends on D9180

Reviewers: qcolombet, atrick

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9181

llvm-svn: 243348
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
llvm/test/Transforms/LoopStrengthReduce/zext-of-scale.ll [new file with mode: 0644]