[PATCH] D48498: [APInt] Add helpers for rounding u/sdivs.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 15:28:14 PDT 2019


lebedev.ri added inline comments.
Herald added subscribers: sanjoy.google, kristina, dexonsmith.
Herald added a project: LLVM.


================
Comment at: llvm/trunk/unittests/ADT/APIntTest.cpp:2299
+
+    for (uint64_t Bi = -128; Bi <= 127; Bi++) {
+      if (Bi == 0)
----------------
This doesn't do what you think it does..
In reality this inner loop simply never runs.


================
Comment at: llvm/trunk/unittests/ADT/APIntTest.cpp:2307
+        auto Prod = Quo.sext(16) * B.sext(16);
+        EXPECT_TRUE(Prod.uge(A));
+        if (Prod.ugt(A)) {
----------------
This always asserts.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D48498/new/

https://reviews.llvm.org/D48498





More information about the llvm-commits mailing list