[llvm-commits] CVS: llvm/test/Programs/SingleSource/UnitTests/2003-05-02-DependantPHI.c
Chris Lattner
lattner at cs.uiuc.edu
Sat May 3 01:59:01 PDT 2003
Changes in directory llvm/test/Programs/SingleSource/UnitTests:
2003-05-02-DependantPHI.c added (r1.1)
---
Log message:
Test case for PHI handling that the CBE botches.
---
Diffs of the changes:
Index: llvm/test/Programs/SingleSource/UnitTests/2003-05-02-DependantPHI.c
diff -c /dev/null llvm/test/Programs/SingleSource/UnitTests/2003-05-02-DependantPHI.c:1.1
*** /dev/null Sat May 3 01:58:22 2003
--- llvm/test/Programs/SingleSource/UnitTests/2003-05-02-DependantPHI.c Sat May 3 01:58:11 2003
***************
*** 0 ****
--- 1,22 ----
+ #include <stdio.h>
+
+ typedef struct List {
+ struct List *Next;
+ int Data;
+ } List;
+
+ List Node0 = {0, 5};
+ List Node1 = {&Node0, 4};
+ List Node2 = {&Node1, 3};
+ List Node3 = {&Node2, 2};
+ List Node4 = {&Node3, 1};
+ List Node5 = {&Node4, 0};
+
+
+ void main() {
+ List *PrevL, *CurL;
+ for (PrevL = 0, CurL = &Node5; CurL; PrevL = CurL, CurL = CurL->Next) {
+ printf("%d %d\n", CurL->Data, PrevL ? PrevL->Data : -1);
+ }
+ }
+
More information about the llvm-commits
mailing list