From: Chris Lattner Date: Sun, 22 Jul 2001 05:00:34 +0000 (+0000) Subject: New test case X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=90147816f67d4adc90d8562b2d40da04f5152ecb;p=oota-llvm.git New test case git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/combinations.c b/test/combinations.c new file mode 100644 index 00000000000..cffdff1d4c6 --- /dev/null +++ b/test/combinations.c @@ -0,0 +1,11 @@ + + +void combinations(unsigned int n, unsigned *A) { + unsigned int i, t = 1; + A[0] = A[n] = 1; + + for (i = 1; i <= n/2; i++) { + t = (t * (n+1-i)) / i; + A[i] = A[n-i] = t; + } +} diff --git a/test/combinations.ll b/test/combinations.ll new file mode 100644 index 00000000000..8dfd67bb516 --- /dev/null +++ b/test/combinations.ll @@ -0,0 +1,39 @@ +implementation + +;; Emitting: void combinations(unsigned int, unsigned int*) +void "combinations"(uint %n, uint* %A) +begin +bb1: ;;