From: Andrew Pinski Date: Tue, 13 Jan 2015 14:08:21 +0000 (+0000) Subject: 2015-01-13 Andrew Pinski X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1f46bd52c5ef8a050b6547dd0f272dc14364d979;p=gcc.git 2015-01-13 Andrew Pinski * config/aarch64/aarch64.c (fusion_load_store): Check dest mode instead of src mode. 2015-01-13 Andrew Pinski * gcc.target/aarch64/store-pair-1.c: New testcase. From-SVN: r219532 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6bf509eb131..0248000ea77 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-01-13 Andrew Pinski + + * config/aarch64/aarch64.c (fusion_load_store): Check dest mode + instead of src mode. + 2015-01-13 Richard Biener PR lto/64373 diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 3b6c67a95cb..1151c8b7e01 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -10520,8 +10520,8 @@ fusion_load_store (rtx_insn *insn, rtx *base, rtx *offset) 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) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a3fea9be37f..4aad423598f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-01-13 Andrew Pinski + + * gcc.target/aarch64/store-pair-1.c: New testcase. + 2015-01-13 Richard Biener PR lto/64373 diff --git a/gcc/testsuite/gcc.target/aarch64/store-pair-1.c b/gcc/testsuite/gcc.target/aarch64/store-pair-1.c new file mode 100644 index 00000000000..46c727e01d5 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/store-pair-1.c @@ -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\]+" } }