PR rtl-optimization/44787
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Jul 2010 23:44:55 +0000 (23:44 +0000)
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Jul 2010 23:44:55 +0000 (23:44 +0000)
* config/arm/arm.md (arith_shiftsi): Allow stack pointer in operand 2.
* config/arm/thumb2.md (thumb2_arith_shiftsi): Likewise.

testsuite/
PR rtl-optimization/44787
* gcc.c-torture/compile/pr44788.c: New test.
* gcc.target/arm/pr44788.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161893 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/arm/arm.md
gcc/config/arm/thumb2.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr44788.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/pr44788.c [new file with mode: 0644]

index 65b7883..6d32d9a 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-07  Bernd Schmidt  <bernds@codesourcery.com>
+
+       PR rtl-optimization/44787
+       * config/arm/arm.md (arith_shiftsi): Allow stack pointer in operand 2.
+       * config/arm/thumb2.md (thumb2_arith_shiftsi): Likewise.
+
 2010-07-06  Jan Hubicka  <jh@suse.cz>
 
        * lto-symtab.c (lto_cgraph_replace_node): Handle aliases.
index 90cf2c6..f36a56c 100644 (file)
           [(match_operator:SI 3 "shift_operator"
              [(match_operand:SI 4 "s_register_operand" "r")
               (match_operand:SI 5 "reg_or_int_operand" "rI")])
-           (match_operand:SI 2 "s_register_operand" "r")]))]
+           (match_operand:SI 2 "s_register_operand" "rk")]))]
   "TARGET_ARM"
   "%i1%?\\t%0, %2, %4%S3"
   [(set_attr "predicable" "yes")
index ac275ad..2e03b8d 100644 (file)
           [(match_operator:SI 3 "shift_operator"
              [(match_operand:SI 4 "s_register_operand" "r")
               (match_operand:SI 5 "const_int_operand" "M")])
-           (match_operand:SI 2 "s_register_operand" "r")]))]
+           (match_operand:SI 2 "s_register_operand" "rk")]))]
   "TARGET_THUMB2"
   "%i1%?\\t%0, %2, %4%S3"
   [(set_attr "predicable" "yes")
index d1211c8..ccb722d 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-07  Bernd Schmidt  <bernds@codesourcery.com>
+
+       PR rtl-optimization/44787
+       * gcc.c-torture/compile/pr44788.c: New test.
+       * gcc.target/arm/pr44788.c: New test.
+
 2010-07-06  Peter Bergner  <bergner@vnet.ibm.com>
 
        * gcc.target/powerpc/altivec-volatile.c: Adjust expected warning.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr44788.c b/gcc/testsuite/gcc.c-torture/compile/pr44788.c
new file mode 100644 (file)
index 0000000..99dc798
--- /dev/null
@@ -0,0 +1,8 @@
+void joint_decode(float* mlt_buffer1, int t) {
+    int i;
+    float decode_buffer[1060];
+    foo(decode_buffer);
+    for (i=0; i<10 ; i++) {
+        mlt_buffer1[i] = i * decode_buffer[t];
+    }
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr44788.c b/gcc/testsuite/gcc.target/arm/pr44788.c
new file mode 100644 (file)
index 0000000..eb4bc11
--- /dev/null
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+/* { dg-options "-Os -fno-strict-aliasing -fPIC -mthumb -march=armv7-a -mfpu=vfp3 -mfloat-abi=softfp" } */
+
+void joint_decode(float* mlt_buffer1, int t) {
+    int i;
+    float decode_buffer[1060];
+    foo(decode_buffer);
+    for (i=0; i<10 ; i++) {
+        mlt_buffer1[i] = i * decode_buffer[t];
+    }
+}