[PATCH] D60061: [InstCombine] ssubo X, C -> saddo X, -C

Dan Robertson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 1 05:43:49 PDT 2019


dlrobertson created this revision.
dlrobertson added reviewers: nikic, spatel.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

ssubo X, C is equivalent to saddo X, -C. Make the transformation in
InstCombine and allow the logic implemented for saddo to fold prior
usages of `add nsw` or `sub nsw` with constants.


https://reviews.llvm.org/D60061

Files:
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  llvm/test/Transforms/InstCombine/ssub-with-overflow.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60061.193069.patch
Type: text/x-patch
Size: 7481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190401/6433323f/attachment.bin>


More information about the llvm-commits mailing list