commit | 12984de3140534da4f312190118726963a2b521e | [log] [tgz] |
---|---|---|
author | Owen Anderson <resistor@mac.com> | Wed Dec 15 22:32:38 2010 +0000 |
committer | Owen Anderson <resistor@mac.com> | Wed Dec 15 22:32:38 2010 +0000 |
tree | 3de799bb13ddb25aae0f2ba6cc629109aeef63d6 | |
parent | e194b26ffd23aa464324429323647af4fcb7df7b [diff] |
Add an InstCombine transform to recognize instances of manual overflow-safe addition (performing the addition in a wider type and explicitly checking for overflow), and fold them down to intrinsics. This currently only supports signed-addition, but could be generalized if someone works out the magic constant formulas for other operations. Fixes <rdar://problem/8558713>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121905 91177308-0d34-0410-b5e6-96231b3b80d8