[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)
commit477137f4d70c7dce95d90e1c121f5cb168c4d891
treebf2293098d48020b29330d0684ed785fd84664c9
parentfc21a105225cd4a04cc82fff9cdba0797d0eb0c2
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243348 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/Transforms/LoopStrengthReduce/zext-of-scale.ll [new file with mode: 0644]