llvm/test
Wojciech Matyjewicz e3320a1bcc 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46955 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11 11:03:14 +00:00
..
Analysis Fix PR1798 - an error in the evaluation of SCEVAddRecExpr at an 2008-02-11 11:03:14 +00:00
Archive
Assembler Two occurrences on one line count as one... 2008-01-11 21:46:24 +00:00
Bindings/Ocaml Fixing a bug creating floating point constants of type other 2008-02-02 01:07:50 +00:00
Bitcode Bring back int_x86_sse2_movl_dq intrinsic for backward compatibility. Make sure 2007-12-17 22:33:23 +00:00
BugPoint
C++Frontend This should also work on x86 now. 2008-02-05 00:25:31 +00:00
CFrontend Pointers change size depending upon the target. Remove them to make the test more stable. 2008-01-30 05:15:15 +00:00
CodeGen Determine whether a spill kills the register it's spilling before insertion rather than trying to undo the kill marker afterwards. 2008-02-11 08:30:52 +00:00
DebugInfo Accept getelementptr starting at GV with all 0 indices as a 2008-01-30 19:00:21 +00:00
ExecutionEngine Teach the interpreter to read and write memory in the 2007-12-14 19:38:31 +00:00
Feature
FrontendAda Testcase for gimplify_expr crash caused by an 2008-01-15 19:55:41 +00:00
FrontendObjC Rename these tests to use the appropriate suffixes. 2007-12-11 15:55:52 +00:00
Integer
lib
Linker
Other
Scripts
TableGen Rename MRegisterInfo to TargetRegisterInfo. 2008-02-10 18:45:23 +00:00
Transforms Fix PR 1995. 2008-02-08 22:49:13 +00:00
Verifier update this test to pass with duncan's change. 2008-01-22 05:31:58 +00:00
Makefile remove attributions from the rest of the llvm makefiles. 2007-12-29 20:11:13 +00:00
Makefile.tests
TestRunner.sh