1 /* Verify that overloaded built-ins for vec_ld with
2 structure pointer / double inputs produce the right code. */
4 /* This test is to ensure that when a cast is associated with arg1 on a
5 call to vec_ld (arg0, arg1), that the arg1 type is properly handled
6 through the gimple folding code.
7 We want something like this:
8 D.2736 = MEM[(voidD.44 *)D.2739];
9 We specifically do not want 'struct S' showing up:
10 D.3212 = MEM[(struct S *)D.3215];
13 /* { dg-do compile { target lp64 } } */
14 /* { dg-require-effective-target powerpc_vsx_ok } */
15 /* { dg-options "-mvsx -O2 -fdump-tree-gimple" } */
22 vector
long long *ll1
;
30 testld_struct1 (long long ll1
, struct S
*p
)
32 return __builtin_altivec_lvx_v2df (ll1
, (double *)p
);
36 testld_struct1b (long long ll1
, struct S
*p
)
38 return vec_ld (ll1
, (vector
double *)p
);
42 testld_struct2 (struct S
*p
)
44 return vec_ld (16, (vector
double *)p
);
48 testld_struct3 (struct S
*p
)
50 return vec_ld (16, (vector
double *)p
->vd2
);
53 // We do not want the "struct S" reference to show up.
54 /* { dg-final { scan-tree-dump-times "MEM\[\(struct S *\)D.\[0-9\]+\]" 0 "gimple" } } */