[PATCH] Added instruction combine to transform few more negative values addition to subtraction
Dinesh Dwivedi
dinesh.d at samsung.com
Mon May 12 15:56:51 PDT 2014
Hi rafael, bkramer,
This patch enable following transform
(x + (~(y & c) + 1) --> x - (y & c)
(x + (~((y >> z) & c) + 1) --> x - ((y>>z) & c)
(x + (~(y | c) + 1) --> x - (y | c) if c is odd
(x + (~((y >> z) | c) + 1) --> x - ((y>>z) | c) if c is odd
Z3 verification code:
http://rise4fun.com/Z3/ZA06
http://reviews.llvm.org/D3733
Files:
lib/Transforms/InstCombine/InstCombineAddSub.cpp
test/Transforms/InstCombine/add2.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3733.9327.patch
Type: text/x-patch
Size: 3761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140512/80b15f71/attachment.bin>
More information about the llvm-commits
mailing list