OSDN Git Service

[InstCombine] Support pulling left shifts through a subtract with constant LHS
authorCraig Topper <craig.topper@intel.com>
Tue, 8 Aug 2017 20:14:11 +0000 (20:14 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 8 Aug 2017 20:14:11 +0000 (20:14 +0000)
commit2fe6bd41fe577aa3536617289fa2df33fdadf31d
tree1b6d9502deabba40290b9ab2ede43ab371c66323
parentca52e101f76eb1c51060efbeac52c167091bbee7
[InstCombine] Support pulling left shifts through a subtract with constant LHS

We already support pulling through an add with constant RHS. We can do the same for subtract.

Differential Revision: https://reviews.llvm.org/D36443

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310407 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineShifts.cpp
test/Transforms/InstCombine/sub.ll