1 /*===- test/Regression/Transforms/Scalar/DecomposeMultiDimRefs.cpp -----=*
3 * This is a feature test that checks for correct code generation
4 * of the SAVE instruction when the stack size does not fit in the
5 * immediate field of the SAVE instruction. This happens in main().
6 *===---------------------------------------------------------------------===*/
11 typedef struct Flat_struct {
16 typedef struct Mixed_struct {
30 for (i=0; i < 10; ++i)
33 for (i=0; i < 10; ++i)
34 for (j=0; j < 10; ++j)
37 for (i=0; i < 10; ++i) {
38 sum += (double) M->F[i].c;
46 InitializeMixed(Mixed_t* M, int base)
50 for (i=0; i < 10; ++i)
53 for (i=0; i < 10; ++i)
54 for (j=0; j < 10; ++j)
55 M->B[i][j] = i*10 + j + base;
57 for (i=0; i < 10; ++i) {
59 M->F[i].x = i / 10 + base;
64 main(int argc, char** argv)
70 InitializeMixed(&M, 100);
71 printf("Sum(M) = %.2f\n", AddMixed(&M));
73 for (i=0; i < 4; i++) {
74 InitializeMixed(&MA[i], 100 * (i+2));
75 printf("Sum(MA[%d]) = %.2f\n", i, AddMixed(&MA[i]));