[llvm] Removed redundant assert and condition in APInt::SetBits (PR #138038)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue May 6 05:03:42 PDT 2025


================
@@ -1370,7 +1370,7 @@ class [[nodiscard]] APInt {
     assert(loBit <= hiBit && "loBit greater than hiBit");
     if (loBit == hiBit)
       return;
-    if (loBit < APINT_BITS_PER_WORD && hiBit <= APINT_BITS_PER_WORD) {
+    if (hiBit <= APINT_BITS_PER_WORD) {
----------------
jayfoad wrote:

Did you mean to remove the redundant assert on line 1369?

https://github.com/llvm/llvm-project/pull/138038


More information about the llvm-commits mailing list