diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/aarch64/thunderxnoloadpair.c')
-rw-r--r-- | gcc/testsuite/gcc.target/aarch64/thunderxnoloadpair.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/aarch64/thunderxnoloadpair.c b/gcc/testsuite/gcc.target/aarch64/thunderxnoloadpair.c new file mode 100644 index 00000000000..3093ad0e1f2 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/thunderxnoloadpair.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mcpu=thunderx" } */ + +struct noldp +{ + int a, b; +}; + + +int f(struct noldp *a) +{ + return a->a + a->b; +} + +/* We know the alignement of a->a to be 4 byte aligned so it is not profitable + to do ldp. */ +/* { dg-final { scan-assembler-not "ldp\tw\[0-9\]+, w\[0-9\]" } } */ |