================ @@ -394,14 +394,13 @@ static bool tryDividePair(std::optional<int64_t> &Val1, return false; const bool Val1HasRemainder = Val1 && *Val1 % Divisor; const bool Val2HasRemainder = Val2 && *Val2 % Divisor; - if (!Val1HasRemainder && !Val2HasRemainder) { - if (Val1) - *Val1 /= Divisor; - if (Val2) - *Val2 /= Divisor; - return true; - } - return false; + if (Val1HasRemainder || Val2HasRemainder) + return false; ---------------- NagyDonat wrote:
I thought about removing these boolean variables (and introducing two separate early return paths for `Val1` and `Val2`), but their names seem to be useful for documenting this logic. https://github.com/llvm/llvm-project/pull/126941 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits