[PATCH] D23362: FIx UB in APInt::ashr

Jonathan Roelofs via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 12:46:17 PDT 2016


jroelofs added inline comments.

================
Comment at: lib/Support/APInt.cpp:1047-1048
@@ -1050,4 +1046,4 @@
   }
 
   // If all the bits were shifted out, the result is, technically, undefined.
   // We return -1 if it was negative, 0 otherwise. We check this early to avoid
----------------
Why yes, it is.


https://reviews.llvm.org/D23362





More information about the llvm-commits mailing list