At this point in the code rhsWords is guaranteed to be non-zero and less than or equal to lhsWords. So if lhsWords is 1, rhsWords must also be 1. urem alread had the check removed so this makes all 3 consistent.
llvm-svn: 302930
if (*this == RHS)
// X / X ===> 1
return APInt(BitWidth, 1);
- if (lhsWords == 1 && rhsWords == 1)
+ if (lhsWords == 1) // rhsWords is 1 if lhsWords is 1.
// All high words are zero, just use native divide
return APInt(BitWidth, this->U.pVal[0] / RHS.U.pVal[0]);
return;
}
- if (lhsWords == 1 && rhsWords == 1) {
+ if (lhsWords == 1) { // rhsWords is 1 if lhsWords is 1.
// There is only one word to consider so use the native versions.
uint64_t lhsValue = LHS.U.pVal[0];
uint64_t rhsValue = RHS.U.pVal[0];