Added instruction combine to transform few more negative values addition to subtracti...
authorDinesh Dwivedi <dinesh.d@samsung.com>
Thu, 19 Jun 2014 10:36:52 +0000 (10:36 +0000)
committerDinesh Dwivedi <dinesh.d@samsung.com>
Thu, 19 Jun 2014 10:36:52 +0000 (10:36 +0000)
commit85386a3de9ebcbf688c0cb864fc26c62fa5220f3
treede6c9b9c192f235da0fb9f92a28188e9c3cbab19
parentcfdf8052865b01e8b8d321640c3f51ff938cc3c4
Added instruction combine to transform few more negative values addition to subtraction (Part 1)
This patch enables transforms for following patterns.
  (x + (~(y & c) + 1)   -->   x - (y & c)
  (x + (~((y >> z) & c) + 1)   -->   x - ((y>>z) & c)

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

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