aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/pr71309.c
blob: e1cbcea7e76393d748c2617765643e26bb6eaed4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-require-effective-target lp64 } */
/* { dg-options "-O2 -mdejagnu-cpu=power9" } */

#define TYPE void*
#define TYPE2 void*

struct path {
    TYPE2 mnt;
    TYPE dentry;
};

struct nameidata {
    struct path path;
    struct path root;
};

__attribute__ ((noinline))
TYPE foo(struct nameidata *nd)
{
  TYPE d;
  TYPE2 d2;

  nd->path = nd->root;
  d = nd->path.dentry;
  d2 = nd->path.mnt;
  return d;
}

/* { dg-final { scan-assembler-not {\mlxv\M} } } */
/* { dg-final { scan-assembler-not {\mstxv\M} } } */
/* { dg-final { scan-assembler-times {\mld\M} 2 } } */
/* { dg-final { scan-assembler-times {\mstd\M} 2 } } */