Message ID | CA+=Sn1kKLh+a+XeX18non9Ymk_L1C85O-bOFCDyRZP80fhW6WA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 13 January 2015 at 04:48, Andrew Pinski <pinskia@gmail.com> wrote: > ChangeLog: > * config/aarch64/aarch64.c (fusion_load_store): Check dest mode > instead of src mode. > > > * gcc.target/aarch64/store-pair-1.c: New testcase. OK, thanks /Marcus
On 13 January 2015 at 13:29, Marcus Shawcroft <marcus.shawcroft@gmail.com> wrote: > On 13 January 2015 at 04:48, Andrew Pinski <pinskia@gmail.com> wrote: > >> ChangeLog: >> * config/aarch64/aarch64.c (fusion_load_store): Check dest mode >> instead of src mode. >> >> >> * gcc.target/aarch64/store-pair-1.c: New testcase. > > OK, thanks /Marcus I fixed the missing /* */ around the dg-final directive, as obvious. Christophe.
Index: testsuite/gcc.target/aarch64/store-pair-1.c =================================================================== --- testsuite/gcc.target/aarch64/store-pair-1.c (revision 0) +++ testsuite/gcc.target/aarch64/store-pair-1.c (revision 0) @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int f(int *a, int b) +{ + a[28] = 0; + a[29] = b; + a[31] = 0; +} + +/* We should be able to produce store pair for the store of 28/29 store. */ +{ dg-final { scan-assembler "stp\tw\[0-9\]+, w\[0-9\]+" } } Index: config/aarch64/aarch64.c =================================================================== --- config/aarch64/aarch64.c (revision 219508) +++ config/aarch64/aarch64.c (working copy) @@ -10520,8 +10520,8 @@ fusion_load_store (rtx_insn *insn, rtx * src = SET_SRC (x); dest = SET_DEST (x); - if (GET_MODE (src) != SImode && GET_MODE (src) != DImode - && GET_MODE (src) != SFmode && GET_MODE (src) != DFmode) + if (GET_MODE (dest) != SImode && GET_MODE (dest) != DImode + && GET_MODE (dest) != SFmode && GET_MODE (dest) != DFmode) return SCHED_FUSION_NONE; if (GET_CODE (src) == SIGN_EXTEND)