blob: 1b68d5a35f02f48d18e717c61f3a6068f8463cec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-esra -w" } */
#define vector __attribute__((vector_size(16) ))
struct VecClass
{
vector float v;
};
vector float foo( vector float v )
{
vector float x = v;
x = x + x;
struct VecClass y = *(struct VecClass*)&x;
return y.v;
}
/* We should be able to remove the intermediate struct and directly
return x. As we do not fold VIEW_CONVERT_EXPR<struct VecClass>(x).v
that doesn't happen right now. */
/* { dg-final { scan-tree-dump-times "VIEW_CONVERT_EXPR" 1 "esra"} } */
/* { dg-final { cleanup-tree-dump "esra" } } */
|