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)
commit562fd7534c1c82b105565e6f01429ebfdd0fa8eb
tree9a37ad65977d5772c32f002f1f070ba35afa15e7
parent54b0949af9feeac7df8f5cd30a41cfa53abcef13
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

llvm-svn: 211266
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/test/Transforms/InstCombine/add2.ll