Resolve the regressions introduced on non-Thumb targets by the Purecode for
ARMv8-M Baseline patch. The TARGET_32BIT conditional has been re-added to the
movsi expander and splitter in addition to TARGET_HAVE_MOVT.

gcc/ChangeLog:

2017-05-11  Prakhar Bahuguna  <prakhar.bahug...@arm.com>

        * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
        TARGET_HAVE_MOVT conditional.
        (movt splitter): Likewise.

Testing done: Full regression testing for ARMv5 (including XScale), ARMv7-A,
ARMv7-M and ARMv8-M. The failing tests in particular (gcc.target/arm/scd42-2.c
and g++.dg/torture/vshuf-v4si.c) now pass and no further regressions were
found.

-- 

Prakhar Bahuguna
>From 6e19667cbe8f66b4a054c1243443a29845fb7397 Mon Sep 17 00:00:00 2001
From: Prakhar Bahuguna <prakhar.bahug...@arm.com>
Date: Thu, 11 May 2017 10:12:02 +0100
Subject: [PATCH] Add missing TARGET_32BIT conditional to movsi

Resolves the regressions introduced on non-Thumb targets by the Purecode
for ARMv8-M Baseline patch.
---
 gcc/config/arm/arm.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 4a2b623e528..6c391347b68 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -5969,7 +5969,7 @@
   {
   rtx base, offset, tmp;
 
-  if (TARGET_HAVE_MOVT)
+  if (TARGET_32BIT || TARGET_HAVE_MOVT)
     {
       /* Everything except mem = const or mem = mem can be done easily.  */
       if (MEM_P (operands[0]))
@@ -6093,7 +6093,7 @@
 (define_split
   [(set (match_operand:SI 0 "arm_general_register_operand" "")
        (match_operand:SI 1 "const_int_operand" ""))]
-  "TARGET_HAVE_MOVT
+  "TARGET_32BIT || TARGET_HAVE_MOVT
   && (!(const_ok_for_arm (INTVAL (operands[1]))
         || const_ok_for_arm (~INTVAL (operands[1]))))"
   [(clobber (const_int 0))]
-- 
2.11.0

Reply via email to