diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-17 16:39:19 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-17 16:39:19 +0000 |
commit | 8012d2c2a0da04442448d78100ebb1ddbedf7af9 (patch) | |
tree | 39d8d4f5cab7cfe22cf74f6a34e24eb1e4551bc1 /gcc/testsuite/gcc.target/arm | |
parent | 9bed074bff4241582b598204c4fc25fc4c305d7c (diff) | |
download | gcc-8012d2c2a0da04442448d78100ebb1ddbedf7af9.tar.gz |
2012-12-17 Andrew Stubbs <ams@codesourcery.com>
Ulrich Weigand <ulrich.weigand@linaro.org>
gcc/
* config/arm/arm.md (zero_extend<mode>di2): Add extra alternatives
for NEON registers.
Add alternative for one-instruction extend-in-place.
(extend<mode>di2): Likewise.
Add constraints for Thumb-mode memory loads.
Prevent extend splitters doing NEON alternatives.
* config/arm/iterators.md (qhs_extenddi_cstr, qhs_zextenddi_cstr):
Adjust constraints to add new alternatives.
* config/arm/neon.md: Add splitters for zero- and sign-extend.
gcc/testsuite/
* gcc.target/arm/neon-extend-1.c: New file.
* gcc.target/arm/neon-extend-2.c: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194558 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/arm')
-rw-r--r-- | gcc/testsuite/gcc.target/arm/neon-extend-1.c | 13 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/arm/neon-extend-2.c | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/arm/neon-extend-1.c b/gcc/testsuite/gcc.target/arm/neon-extend-1.c new file mode 100644 index 00000000000..cfe83ce1bde --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/neon-extend-1.c @@ -0,0 +1,13 @@ +/* { dg-require-effective-target arm_neon_hw } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_neon } */ + +void +f (unsigned int a) +{ + unsigned long long b = a; + asm volatile ("@ extended to %0" : : "w" (b)); +} + +/* { dg-final { scan-assembler "vdup.32" } } */ +/* { dg-final { scan-assembler "vshr.u64" } } */ diff --git a/gcc/testsuite/gcc.target/arm/neon-extend-2.c b/gcc/testsuite/gcc.target/arm/neon-extend-2.c new file mode 100644 index 00000000000..1c5a17e4278 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/neon-extend-2.c @@ -0,0 +1,13 @@ +/* { dg-require-effective-target arm_neon_hw } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_neon } */ + +void +f (int a) +{ + long long b = a; + asm volatile ("@ extended to %0" : : "w" (b)); +} + +/* { dg-final { scan-assembler "vdup.32" } } */ +/* { dg-final { scan-assembler "vshr.s64" } } */ |