1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/Analysis/ScalarEvolution
Wojciech Matyjewicz 76c2b22ee4 Fix PR1798 - an error in the evaluation of SCEVAddRecExpr at an
arbitrary iteration.

The patch:
1) changes SCEVSDivExpr into SCEVUDivExpr,
2) replaces PartialFact() function with BinomialCoefficient(); the 
computations (essentially, the division) in BinomialCoefficient() are 
performed with the apprioprate bitwidth necessary to avoid overflow; 
unsigned division is used instead of the signed one.

Computations in BinomialCoefficient() require support from the code 
generator for APInts. Currently, we use a hack rounding up the 
neccessary bitwidth to the nearest power of 2. The hack is easy to turn 
off in future.

One remaining issue: we assume the divisor of the binomial coefficient 
formula can be computed accurately using 16 bits. It means we can handle 
AddRecs of length up to 9. In future, we should use APInts to evaluate 
the divisor.

Thanks to Nicholas for cooperation!

llvm-svn: 46955
2008-02-11 11:03:14 +00:00
..
2007-07-15-NegativeStride.ll Change grep '' to grep {}. 2007-11-27 00:10:35 +00:00
2007-08-06-MisinterpretBranch.ll Fix the dates on these tests. It's not September yet. Thanks Reid! 2007-08-06 20:00:11 +00:00
2007-08-06-Unsigned.ll Fix bug in regression tests that ignored stderr output in RUN lines. Updated tests and fixed broken run lines. 2007-11-28 04:57:00 +00:00
2007-09-27-LargeStepping.ll Change grep '' to grep {}. 2007-11-27 00:10:35 +00:00
2007-11-14-SignedAddRec.ll Fix PR1798 - an error in the evaluation of SCEVAddRecExpr at an 2008-02-11 11:03:14 +00:00
2007-11-18-OrInstruction.ll Change grep '' to grep {}. 2007-11-27 00:10:35 +00:00
dg.exp For PR1319: 2007-04-15 09:31:07 +00:00
do-loop.ll Add new SCEV, SCEVSMax. This allows LLVM to analyze do-while loops. 2007-11-25 22:41:31 +00:00
smax.ll Add new SCEV, SCEVSMax. This allows LLVM to analyze do-while loops. 2007-11-25 22:41:31 +00:00
SolveQuadraticEquation.ll Add two test cases to cover apintification change. 2007-04-26 16:44:48 +00:00
trip-count2.ll Add two test cases to cover apintification change. 2007-04-26 16:44:48 +00:00
trip-count.ll For PR1319: 2007-04-15 09:31:07 +00:00