[PATCH] [ConstantRange] Add a smultiply method for signed multiply

James Molloy James.Molloy at arm.com
Wed Feb 25 08:21:19 PST 2015


Hi all,

It appears phab hasn’t kept track of this thread; I’ve updated http://reviews.llvm.org/D7789 based upon our discussion.

Thanks for the review.

Cheers,

James

On 23 Feb 2015, at 03:56, Sanjoy Das <sanjoy at playingwithpointers.com<mailto:sanjoy at playingwithpointers.com>> wrote:

clearly identified a deficiency. ConstantRange::multiply could compute it
twice once with zext and unsigned min/max and again with sext and signed
min/max, then choose the one with the smaller range. Maybe there's an even
better algorithm.

Do you think there is value in being more precise if one of the ranges
has one element (or, by extension, a small number of elements)?
Finding a precise range for [a, b) * { c } may be a much easier
problem to solve than finding a precise range for [a, b) * [c, d) if
the former shows up frequently enough.

-- Sanjoy



-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150225/b3c6fb6c/attachment.html>


More information about the llvm-commits mailing list