diff options
author | yroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-04-02 06:50:24 +0000 |
---|---|---|
committer | yroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-04-02 06:50:24 +0000 |
commit | 4756577d676c435e3459d626079ffef9a9b5f6e2 (patch) | |
tree | bd6f5402285d647df0ca3156001dd7bd45fd1927 | |
parent | 87d40d9f0f9c79a24f7cfa3b34eba6041e432b29 (diff) |
gcc/
2015-04.02 Yvan Roux <yvan.roux@linaro.org>
Backport from trunk r218867, r218868.
2014-12-18 Alan Lawrence <alan.lawrence@arm.com>
* config/aarch64/aarch64-simd.md (aarch64_lshr_simddi): Handle shift
by 64 by moving const0_rtx.
(aarch64_ushr_simddi): Delete.
* config/aarch64/aarch64.md (enum unspec): Delete UNSPEC_USHR64.
2014-12-18 Alan Lawrence <alan.lawrence@arm.com>
* config/aarch64/aarch64.md (enum "unspec"): Remove UNSPEC_SSHR64.
* config/aarch64/aarch64-simd.md (aarch64_ashr_simddi): Change shift
amount to 63 if was 64.
(aarch64_sshr_simddi): Remove.
gcc/testsuite/
2015-04-02 Yvan Roux <yvan.roux@linaro.org>
Backport from trunk r218868.
2014-12-18 Alan Lawrence <alan.lawrence@arm.com>
* gcc.target/aarch64/ushr64_1.c: Remove scan-assembler "ushr...64".
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@221821 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.linaro | 19 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64-simd.md | 32 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.md | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog.linaro | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/aarch64/ushr64_1.c | 1 |
5 files changed, 32 insertions, 29 deletions
diff --git a/gcc/ChangeLog.linaro b/gcc/ChangeLog.linaro index 9bafa165c82..621880eb384 100644 --- a/gcc/ChangeLog.linaro +++ b/gcc/ChangeLog.linaro @@ -1,3 +1,22 @@ +2015-04.02 Yvan Roux <yvan.roux@linaro.org> + + Backport from trunk r218867, r218868. + 2014-12-18 Alan Lawrence <alan.lawrence@arm.com> + + * config/aarch64/aarch64-simd.md (aarch64_lshr_simddi): Handle shift + by 64 by moving const0_rtx. + (aarch64_ushr_simddi): Delete. + + * config/aarch64/aarch64.md (enum unspec): Delete UNSPEC_USHR64. + + 2014-12-18 Alan Lawrence <alan.lawrence@arm.com> + + * config/aarch64/aarch64.md (enum "unspec"): Remove UNSPEC_SSHR64. + + * config/aarch64/aarch64-simd.md (aarch64_ashr_simddi): Change shift + amount to 63 if was 64. + (aarch64_sshr_simddi): Remove. + 2015-04-02 Yvan Roux <yvan.roux@linaro.org> Backport from trunk r218855. diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index d23ca70c9ef..61704532b3f 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -723,25 +723,16 @@ (match_operand:SI 2 "aarch64_shift_imm64_di" "")] "TARGET_SIMD" { + /* An arithmetic shift right by 64 fills the result with copies of the sign + bit, just like asr by 63 - however the standard pattern does not handle + a shift by 64. */ if (INTVAL (operands[2]) == 64) - emit_insn (gen_aarch64_sshr_simddi (operands[0], operands[1])); - else - emit_insn (gen_ashrdi3 (operands[0], operands[1], operands[2])); + operands[2] = GEN_INT (63); + emit_insn (gen_ashrdi3 (operands[0], operands[1], operands[2])); DONE; } ) -;; SIMD shift by 64. This pattern is a special case as standard pattern does -;; not handle NEON shifts by 64. -(define_insn "aarch64_sshr_simddi" - [(set (match_operand:DI 0 "register_operand" "=w") - (unspec:DI - [(match_operand:DI 1 "register_operand" "w")] UNSPEC_SSHR64))] - "TARGET_SIMD" - "sshr\t%d0, %d1, 64" - [(set_attr "type" "neon_shift_imm")] -) - (define_expand "vlshr<mode>3" [(match_operand:VQ_S 0 "register_operand" "") (match_operand:VQ_S 1 "register_operand" "") @@ -762,24 +753,13 @@ "TARGET_SIMD" { if (INTVAL (operands[2]) == 64) - emit_insn (gen_aarch64_ushr_simddi (operands[0], operands[1])); + emit_move_insn (operands[0], const0_rtx); else emit_insn (gen_lshrdi3 (operands[0], operands[1], operands[2])); DONE; } ) -;; SIMD shift by 64. This pattern is a special case as standard pattern does -;; not handle NEON shifts by 64. -(define_insn "aarch64_ushr_simddi" - [(set (match_operand:DI 0 "register_operand" "=w") - (unspec:DI - [(match_operand:DI 1 "register_operand" "w")] UNSPEC_USHR64))] - "TARGET_SIMD" - "ushr\t%d0, %d1, 64" - [(set_attr "type" "neon_shift_imm")] -) - (define_expand "vec_set<mode>" [(match_operand:VQ_S 0 "register_operand") (match_operand:<VEL> 1 "register_operand") diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 411ad67575b..0b1d7940482 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -103,7 +103,6 @@ UNSPEC_SISD_SSHL UNSPEC_SISD_USHL UNSPEC_SSHL_2S - UNSPEC_SSHR64 UNSPEC_ST1 UNSPEC_ST2 UNSPEC_ST3 @@ -114,7 +113,6 @@ UNSPEC_TLS UNSPEC_TLSDESC UNSPEC_USHL_2S - UNSPEC_USHR64 UNSPEC_VSTRUCTDUMMY UNSPEC_SP_SET UNSPEC_SP_TEST diff --git a/gcc/testsuite/ChangeLog.linaro b/gcc/testsuite/ChangeLog.linaro index 9b6339b0aa7..9d8ebc99e4b 100644 --- a/gcc/testsuite/ChangeLog.linaro +++ b/gcc/testsuite/ChangeLog.linaro @@ -1,5 +1,12 @@ 2015-04-02 Yvan Roux <yvan.roux@linaro.org> + Backport from trunk r218868. + 2014-12-18 Alan Lawrence <alan.lawrence@arm.com> + + * gcc.target/aarch64/ushr64_1.c: Remove scan-assembler "ushr...64". + +2015-04-02 Yvan Roux <yvan.roux@linaro.org> + Backport from trunk r218855. 2014-12-18 Bin Cheng <bin.cheng@arm.com> diff --git a/gcc/testsuite/gcc.target/aarch64/ushr64_1.c b/gcc/testsuite/gcc.target/aarch64/ushr64_1.c index b1c741dac31..ee494894f6f 100644 --- a/gcc/testsuite/gcc.target/aarch64/ushr64_1.c +++ b/gcc/testsuite/gcc.target/aarch64/ushr64_1.c @@ -42,7 +42,6 @@ test_vshrd_n_u64_0 (uint64_t passed, uint64_t expected) return vshrd_n_u64 (passed, 0) != expected; } -/* { dg-final { scan-assembler-times "ushr\\td\[0-9\]+, d\[0-9\]+, 64" 2 } } */ /* { dg-final { (scan-assembler-times "ushr\\td\[0-9\]+, d\[0-9\]+, 4" 2) || \ (scan-assembler-times "lsr\\tx\[0-9\]+, x\[0-9\]+, 4" 2) } } */ /* { dg-final { scan-assembler-not "ushr\\td\[0-9\]+, d\[0-9\]+, 0" } } */ |