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