[llvm-commits] [llvm] r116457 - in /llvm/trunk: include/llvm/ADT/APInt.h lib/Analysis/ConstantFolding.cpp lib/Support/APInt.cpp test/Transforms/ConstProp/overflow-ops.ll

Duncan Sands baldrick at free.fr
Thu Oct 14 00:37:22 PDT 2010


Hi Chris,

> +APInt APInt::usub_ov(const APInt&RHS, bool&Overflow) const {
> +  APInt Res = *this+RHS;

shouldn't this plus sign be a minus sign, since you are doing subtraction?

> +  Overflow = Res.ugt(RHS);
> +  return Res;
> +}

Ciao,

Duncan.



More information about the llvm-commits mailing list