aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2016-04-07 14:20:51 +0200
committerChristophe Lyon <christophe.lyon@linaro.org>2016-04-07 14:20:51 +0200
commit635bde251e0fa272b714c56ed6d662126540a9c0 (patch)
tree2784d6b8412900090cd7e8f551b17b8dab290aea /gcc/testsuite
parentf5c8075d36a1c290d063a3dfc0c1715737f8a5ba (diff)
gcc/
Backport from trunk r234792. 2016-04-06 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/70398 * lra-constraints.c (process_address_1): Check zero scale and code for reloading with zero scale. gcc/testsuite/ Backport from trunk r234792. 2016-04-06 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/70398 * testsuite/gcc.target/aarch64/pr70398.c: New. Change-Id: Idbc40befed04ebd8c25deb0773ed1102c20d12a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr70398.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/aarch64/pr70398.c b/gcc/testsuite/gcc.target/aarch64/pr70398.c
new file mode 100644
index 00000000000..dbe5ad1b24f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr70398.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-options "-O -fno-tree-loop-optimize -fno-tree-ter -static" } */
+unsigned int in[8 * 8] =
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 };
+
+unsigned char out[8 * 8];
+
+int
+main (void)
+{
+ int i;
+ for (i = 0; i < 8 * 4; i++)
+ {
+ out[i * 2] = (unsigned char) in[i * 2] + 1;
+ out[i * 2 + 1] = (unsigned char) in[i * 2 + 1] + 2;
+ }
+ __asm__("":::"memory");
+ for (i = 0; i < 8 * 4; i++)
+ {
+ if (out[i * 2] != in[i * 2] + 1
+ || out[i * 2 + 1] != in[i * 2 + 1] + 2)
+ __builtin_abort ();
+ }
+ return 0;
+}