diff options
author | Chris Lattner <sabre@nondot.org> | 2010-10-14 00:30:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-10-14 00:30:00 +0000 |
commit | b9681ad442c32aec560c4db3a4bc7a59d018f87e (patch) | |
tree | bc272a84ee25254ae075ebffaf5b02ada83555f8 /llvm/lib/Support/APInt.cpp | |
parent | c7bd5740eb6f9414965282c08af3f36ad57a0726 (diff) | |
download | llvm-b9681ad442c32aec560c4db3a4bc7a59d018f87e.zip llvm-b9681ad442c32aec560c4db3a4bc7a59d018f87e.tar.gz llvm-b9681ad442c32aec560c4db3a4bc7a59d018f87e.tar.bz2 |
fix a bug I introduced, no idea how this didn't repro right.
llvm-svn: 116462
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 3807314..88f9ac6 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -2067,8 +2067,8 @@ APInt APInt::ssub_ov(const APInt &RHS, bool &Overflow) const { } APInt APInt::usub_ov(const APInt &RHS, bool &Overflow) const { - APInt Res = *this+RHS; - Overflow = Res.ugt(RHS); + APInt Res = *this-RHS; + Overflow = Res.ugt(*this); return Res; } |