add uadd_ov/usub_ov to apint, consolidate constant folding
authorChris Lattner <sabre@nondot.org>
Thu, 14 Oct 2010 00:05:07 +0000 (00:05 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 14 Oct 2010 00:05:07 +0000 (00:05 +0000)
commiteafc5cb80d58cb9447623a557be4d4f55f42fbc3
tree56190b2247d2cd228717675daad96d9864deee39
parent08e90f5646e61c3be0eebfa172ec73a8b56abee8
add uadd_ov/usub_ov to apint, consolidate constant folding
logic to use the new APInt methods.  Among other things this
implements rdar://8501501 - llvm.smul.with.overflow.i32 should constant fold

which comes from "clang -ftrapv", originally brought to my attention from PR8221.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116457 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/APInt.h
lib/Analysis/ConstantFolding.cpp
lib/Support/APInt.cpp
test/Transforms/ConstProp/overflow-ops.ll