gcc/
authoryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 10 Aug 2014 22:59:19 +0000 (22:59 +0000)
committeryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 10 Aug 2014 22:59:19 +0000 (22:59 +0000)
2014-08-11 Yvan Roux  <yvan.roux@linaro.org>

Backport from trunk r213376.
2014-07-31  Charles Baylis  <charles.baylis@linaro.org>

PR target/61948
* config/arm/neon.md (ashldi3_neon): Don't emit arm_ashldi3_1bit unless
constraints are satisfied.
(<shift>di3_neon): Likewise.

gcc/testsuite
2014-08-11 Yvan Roux  <yvan.roux@linaro.org>
Backport from trunk r213376.
2014-07-31  Charles Baylis  <charles.baylis@linaro.org>

PR target/61948
* gcc.target/arm/pr61948.c: New test case.

git-svn-id: svn://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@213800 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog.linaro
gcc/config/arm/neon.md
gcc/testsuite/ChangeLog.linaro
gcc/testsuite/gcc.target/arm/pr61948.c [new file with mode: 0644]

index 2fe475f..6f0c074 100644 (file)
@@ -1,5 +1,15 @@
 2014-08-11 Yvan Roux  <yvan.roux@linaro.org>
 
+       Backport from trunk r213376.
+       2014-07-31  Charles Baylis  <charles.baylis@linaro.org>
+
+       PR target/61948
+       * config/arm/neon.md (ashldi3_neon): Don't emit arm_ashldi3_1bit unless
+       constraints are satisfied.
+       (<shift>di3_neon): Likewise.
+
+2014-08-11 Yvan Roux  <yvan.roux@linaro.org>
+
        Backport from trunk r211270, r211271, r211273, r211275, r212943,
        r212945, r212946, r212947, r212949, r212950, r212951, r212952, r212954,
        r212955, r212956, r212957, r212958, r212976, r212996, r212997, r212999,
index 8397061..933944a 100644 (file)
       }
     else
       {
-       if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 1)
+       if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 1
+           && (!reg_overlap_mentioned_p (operands[0], operands[1])
+               || REGNO (operands[0]) == REGNO (operands[1])))
          /* This clobbers CC.  */
          emit_insn (gen_arm_ashldi3_1bit (operands[0], operands[1]));
        else
       }
     else
       {
-       if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 1)
+       if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 1
+           && (!reg_overlap_mentioned_p (operands[0], operands[1])
+               || REGNO (operands[0]) == REGNO (operands[1])))
          /* This clobbers CC.  */
          emit_insn (gen_arm_<shift>di3_1bit (operands[0], operands[1]));
        else
index 77aeba4..6306751 100644 (file)
@@ -1,4 +1,11 @@
 2014-08-11 Yvan Roux  <yvan.roux@linaro.org>
+       Backport from trunk r213376.
+       2014-07-31  Charles Baylis  <charles.baylis@linaro.org>
+
+       PR target/61948
+       * gcc.target/arm/pr61948.c: New test case.
+
+2014-08-11 Yvan Roux  <yvan.roux@linaro.org>
 
        Backport from trunk r212959, r212976, r212999, r213000.
        2014-07-24  Jiong Wang  <jiong.wang@arm.com>
diff --git a/gcc/testsuite/gcc.target/arm/pr61948.c b/gcc/testsuite/gcc.target/arm/pr61948.c
new file mode 100644 (file)
index 0000000..411e898
--- /dev/null
@@ -0,0 +1,16 @@
+/* PR target/61948 */
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+/* { dg-options "-O2 -mthumb" } */
+/* { dg-add-options arm_neon } */
+
+long long f (long long *c)
+{
+  long long t = c[0];
+  asm ("nop" : : : "r0", "r3", "r4", "r5",
+                  "r6", "r7", "r8", "r9",
+                  "r10", "r11", "r12", "memory");
+  return t >> 1;
+}
+