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. llvm-svn: 116457
Showing
- llvm/include/llvm/ADT/APInt.h 3 additions, 3 deletionsllvm/include/llvm/ADT/APInt.h
- llvm/lib/Analysis/ConstantFolding.cpp 28 additions, 32 deletionsllvm/lib/Analysis/ConstantFolding.cpp
- llvm/lib/Support/APInt.cpp 12 additions, 0 deletionsllvm/lib/Support/APInt.cpp
- llvm/test/Transforms/ConstProp/overflow-ops.ll 11 additions, 0 deletionsllvm/test/Transforms/ConstProp/overflow-ops.ll
Loading
Please register or sign in to comment