diff mbox

[AARCH64] Fix ICE in aarch64_split_doubleword_move

Message ID 507D78DC.4010904@arm.com
State New
Headers show

Commit Message

Marcus Shawcroft Oct. 16, 2012, 3:10 p.m. UTC
I've just committed this patch to aarch64-trunk to resolve an ICE in 
aarch64_split_doubleword_move when attempting to split v->v moves.

/Marcus

2012-10-16  Marcus Shawcroft <marcus.shawcroft@arm.com>
 
 

        * config/aarch64/aarch64-protos.h (aarch64_split_doubleword_move):
        Rename to aarch64_split_128bit_move.
        (aarch64_split_128bit_move_p): New.
        * config/aarch64/aarch64.c (aarch64_split_doubleword_move):
        Rename to aarch64_split_128bit_move.
        (aarch64_split_128bit_move_p): New.
        * config/aarch64/aarch64.md: Adjust TImode move split.

Comments

Marcus Shawcroft Oct. 16, 2012, 3:53 p.m. UTC | #1
On 16/10/12 16:10, Marcus Shawcroft wrote:
> I've just committed this patch to aarch64-trunk to resolve an ICE in
> aarch64_split_doubleword_move when attempting to split v->v moves.
>
> /Marcus
>
> 2012-10-16  Marcus Shawcroft<marcus.shawcroft@arm.com>
>
>
>
>          * config/aarch64/aarch64-protos.h (aarch64_split_doubleword_move):
>          Rename to aarch64_split_128bit_move.
>          (aarch64_split_128bit_move_p): New.
>          * config/aarch64/aarch64.c (aarch64_split_doubleword_move):
>          Rename to aarch64_split_128bit_move.
>          (aarch64_split_128bit_move_p): New.
>          * config/aarch64/aarch64.md: Adjust TImode move split.

and committed to aarch64-4.7-branch.

/Marcus
diff mbox

Patch

diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h
index e6d35e4..712d2f6 100644
--- a/gcc/config/aarch64/aarch64-protos.h
+++ b/gcc/config/aarch64/aarch64-protos.h
@@ -245,7 +245,9 @@  void aarch64_simd_lane_bounds (rtx, HOST_WIDE_INT, HOST_WIDE_INT);
 /* Emit code for reinterprets.  */
 void aarch64_simd_reinterpret (rtx, rtx);
 
-void aarch64_split_doubleword_move (rtx, rtx);
+void aarch64_split_128bit_move (rtx, rtx);
+
+bool aarch64_split_128bit_move_p (rtx, rtx);
 
 #if defined (RTX_CODE)
 
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index a766b7e..b36be90 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -537,7 +537,7 @@  aarch64_emit_move (rtx dest, rtx src)
 }
 
 void
-aarch64_split_doubleword_move (rtx dst, rtx src)
+aarch64_split_128bit_move (rtx dst, rtx src)
 {
   rtx low_dst;
 
@@ -569,7 +569,7 @@  aarch64_split_doubleword_move (rtx dst, rtx src)
 	}
       /* Fall through to r -> r cases.  */
     }
-    
+
   low_dst = gen_lowpart (word_mode, dst);
   if (REG_P (low_dst)
       && reg_overlap_mentioned_p (low_dst, src))
@@ -586,6 +586,13 @@  aarch64_split_doubleword_move (rtx dst, rtx src)
     }
 }
 
+bool
+aarch64_split_128bit_move_p (rtx dst, rtx src)
+{
+  return (! REG_P (src)
+	  || ! (FP_REGNUM_P (REGNO (dst)) && FP_REGNUM_P (REGNO (src))));
+}
+
 static rtx
 aarch64_force_temporary (rtx x, rtx value)
 {
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 5c92a5b..1669726 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -947,10 +947,10 @@ 
 (define_split
    [(set (match_operand:TI 0 "register_operand" "")
 	 (match_operand:TI 1 "aarch64_reg_or_imm" ""))]
-  "reload_completed"
+  "reload_completed && aarch64_split_128bit_move_p (operands[0], operands[1])"
   [(const_int 0)]
 {
-  aarch64_split_doubleword_move (operands[0], operands[1]);
+  aarch64_split_128bit_move (operands[0], operands[1]);
   DONE;
 })
 
-- 
1.7.12.rc0.22.gcdd159b