2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fcompare-debug" } */
4 /* { dg-options "-O2 -fcompare-debug -fno-short-enums" {target short_enums} } */
5 /* { dg-require-effective-target int32plus } */
8 typedef struct rtx_def
*rtx
;
9 typedef const struct rtx_def
*const_rtx
;
11 typedef struct rtvec_def
*rtvec
;
12 extern int ix86_isa_flags
;
24 NUM_MACHINE_MODES
= MAX_MACHINE_MODE
26 extern unsigned char mode_size
[NUM_MACHINE_MODES
];
27 extern const unsigned char mode_inner
[NUM_MACHINE_MODES
];
28 extern const unsigned char mode_nunits
[NUM_MACHINE_MODES
];
42 typedef union rtunion_def rtunion
;
45 __extension__
enum rtx_code code
: 16;
47 __extension__
enum machine_mode mode
: 8;
56 extern int rtx_equal_p (const_rtx
, const_rtx
);
57 extern rtx
gen_reg_rtx (enum machine_mode
);
60 ix86_expand_vector_init_concat (enum machine_mode mode
,
61 rtx target
, rtx
*ops
, int n
);
64 ix86_expand_vector_init_general (unsigned char mmx_ok
, enum machine_mode mode
,
67 rtx ops
[32], op0
, op1
;
68 enum machine_mode half_mode
= VOIDmode
;
75 n
= mode_nunits
[mode
];
76 ix86_expand_vector_init_concat (mode
, target
, ops
, n
);
87 n
= mode_nunits
[mode
];
88 for (i
= 0; i
< n
; i
++)
89 ops
[i
] = (((((vals
)->u
.fld
[0]).rt_rtvec
))->elem
[i
]);
90 op0
= gen_reg_rtx (VOIDmode
);
94 if (!((ix86_isa_flags
& (1 << 19)) != 0))
98 if (!((ix86_isa_flags
& (1 << 17)) != 0))
101 n
= mode_nunits
[mode
];
102 for (i
= 0; i
< n
; i
++)
103 ops
[i
] = (((((vals
)->u
.fld
[0]).rt_rtvec
))->elem
[i
]);
113 n_words
= ((unsigned short) mode_size
[mode
]) / 4;
116 ix86_expand_vector_init_general (0, V4SImode
, 0, 0);
122 ix86_expand_vector_init (unsigned char mmx_ok
, rtx target
, rtx vals
)
124 enum machine_mode mode
= ((enum machine_mode
) (target
)->mode
);
125 enum machine_mode inner_mode
= ((enum machine_mode
) mode_inner
[mode
]);
126 int n_elts
= mode_nunits
[mode
];
127 int n_var
= 0, one_var
= -1;
128 unsigned char all_same
= 1, all_const_zero
= 1;
132 for (i
= 0; i
< n_elts
; ++i
)
134 x
= (((((vals
)->u
.fld
[0]).rt_rtvec
))->elem
[i
]);
135 if (!((((enum rtx_code
) (x
)->code
) == CONST_INT
)
136 || ((enum rtx_code
) (x
)->code
) == CONST_DOUBLE
137 || ((enum rtx_code
) (x
)->code
) == CONST_FIXED
))
138 n_var
++, one_var
= i
;
141 if (i
> 0 && !rtx_equal_p (x
, (((((vals
)->u
.fld
[0]).rt_rtvec
))->elem
[0])))
161 ix86_expand_vector_init_general (mmx_ok
, mode
, target
, vals
);