summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target
diff options
context:
space:
mode:
authoryufeng <yufeng@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-26 16:36:14 +0000
committeryufeng <yufeng@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-26 16:36:14 +0000
commit9f2b70c26f37f498269e781d83bd20a710589075 (patch)
treed8984967b38da86b473cf3d7e3a220add54238c5 /gcc/testsuite/gcc.target
parent3dad27e9f62890802f6e4e705dcd33e92fdb6c4f (diff)
downloadgcc-9f2b70c26f37f498269e781d83bd20a710589075.tar.gz
gcc/
* config/arm/arm.c (arm_legitimize_address): Check xop1 is not a constant immediate before force_reg. gcc/testsuite/ * gcc.target/arm/20131120.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205397 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target')
-rw-r--r--gcc/testsuite/gcc.target/arm/20131120.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/arm/20131120.c b/gcc/testsuite/gcc.target/arm/20131120.c
new file mode 100644
index 00000000000..c370ae60cd8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/20131120.c
@@ -0,0 +1,14 @@
+/* Check that CONST_INT is not forced into REG before PLUS. */
+/* { dg-do compile { target { arm_arm_ok || arm_thumb2_ok} } } */
+/* { dg-options "-O2 -fdump-rtl-expand" } */
+
+typedef int Arr2[50][50];
+
+void
+foo (Arr2 a2, int i)
+{
+ a2[i+20][i] = 1;
+}
+
+/* { dg-final { scan-rtl-dump-not "\\\(set \\\(reg:SI \[0-9\]*\\\)\[\n\r\]+\[ \t]*\\\(const_int 4000" "expand" } } */
+/* { dg-final { cleanup-rtl-dump "expand" } } */