[llvm-commits] Fix for PR1798 (ScalarEvolution)

Wojciech Matyjewicz wmatyjewicz at fastmail.fm
Mon Feb 11 03:11:44 PST 2008


Nick Lewycky wrote:
>> After your question, I have realized that 32 bits for the divisor may be
>> too much... Using "only" 16 bits would allow us to handle AddRecs up to
>> length 8. If you agree 16 is a safe bitwidth, I'll change it. However,
>> the maximum operation you ask about will still be necessary.
> 
> Optimally, we'd use APInt and get the right length up front, but there's 
> no need for that to hold up this patch.

Ok. I've added a comment for that.

I've also lifted the restriction that the dividend should be at least 32
bits wide. Currently, the dividend is computed with the minimum
necessary bitwidth and extended, if needed, just before the division.

The patch is here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080211/058097.html

I think it's a good idea to keep the PR open. It will prevent us from
forgetting to turn off the hack in future...

Wojtek




More information about the llvm-commits mailing list