1 /* Make sure combine eliminates all unnecessary instructions for the
2 sixteen cases of hi/lo multiplications. */
4 /* { dg-do compile } */
5 /* { dg-options "-O2" } */
7 /* { dg-final { scan-assembler-not "<<" } } */
8 /* { dg-final { scan-assembler-not "PACK" } } */
10 extern void abort (void);
11 extern void exit (int);
13 typedef short __v2hi
__attribute ((vector_size(4)));
14 typedef __v2hi fract2x16
;
15 typedef short fract16
;
17 #define GETVECT(HILO1,HILO2,IN1,IN2) \
18 __builtin_bfin_compose_2x16 ((HILO2) ? __builtin_bfin_extract_hi (IN1) : __builtin_bfin_extract_lo (IN1), \
19 (HILO1) ? __builtin_bfin_extract_hi (IN2) : __builtin_bfin_extract_lo (IN2))
20 #define DOTEST(IN1, IN2, HL1, HL2, HL3, HL4) \
21 __builtin_bfin_multr_fr2x16 (GETVECT (HL1, HL2, IN1, IN1), \
22 GETVECT (HL3, HL4, IN2, IN2))
24 #define FUNC(HL1, HL2, HL3, HL4) \
25 fract2x16 foo ## HL1 ## HL2 ## HL3 ## HL4 (fract2x16 a, fract2x16 b)\
27 return DOTEST(a, b, HL1, HL2, HL3, HL4);\