[PATCH] [InstCombine] mark ADD with nuw if no unsigned overflow
Jingyue Wu
jingyue at google.com
Fri Jun 13 21:52:31 PDT 2014
Hi eliben, meheff, rafael,
As a starting step, we only use one simple heuristic: if the sign bits
of both a and b are zero, we can prove "add a, b" do not unsigned
overflow, and thus convert it to "add nuw a, b".
Updated all affected tests and added two new tests (@zero_sign_bit and
@zero_sign_bit2) in AddOverflow.ll
http://reviews.llvm.org/D4144
Files:
lib/Transforms/InstCombine/InstCombine.h
lib/Transforms/InstCombine/InstCombineAddSub.cpp
test/Transforms/InstCombine/AddOverFlow.ll
test/Transforms/InstCombine/add-sitofp.ll
test/Transforms/InstCombine/ffs-1.ll
test/Transforms/InstCombine/select.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4144.10417.patch
Type: text/x-patch
Size: 6160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140614/33f8ab91/attachment.bin>
More information about the llvm-commits
mailing list