[PATCH] [ConstantRange] Teach multiply to be cleverer about signed ranges.
Sanjoy Das
sanjoy at playingwithpointers.com
Wed Feb 25 10:50:31 PST 2015
Small nit inline. I think this looks okay, but I don't know this part of LLVM to LGTM this.
REPOSITORY
rL LLVM
================
Comment at: lib/IR/ConstantRange.cpp:609
@@ +608,3 @@
+ // lower and upper ranges; for example:
+ // [-1,4) * [-2,3) = min(-1*-2, -1*3, 4*-2, 4*3) = -8.
+ // Similarly for the upper bound, swapping min for max.
----------------
This example is a bit off, the min should be `min(-1*-2, -1*2, 3*-2, 3*2)` = `-6`. The code is correct, as far as I can tell.
http://reviews.llvm.org/D7789
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list