Fix preload instruction isel. Only v7 supports pli, and only v7 with mp extension...
[oota-llvm.git] / lib / Support / APInt.cpp
index 3807314bac478e21568ebd3a4dfe8b1c16ede0cf..88f9ac63f7e99e9ff9ac07aabd27e1d0be6d56df 100644 (file)
@@ -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;
 }