]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix target/38697
authorRamana Radhakrishnan <ramana.radhakrishnan@arm.com>
Tue, 19 Jan 2010 14:21:14 +0000 (14:21 +0000)
committerRamana Radhakrishnan <ramana@gcc.gnu.org>
Tue, 19 Jan 2010 14:21:14 +0000 (14:21 +0000)
2010-01-19  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

       PR target/38697
       * config/arm/neon-testgen.m (emit_automatics): New parameter
features. Adjust for Fixed_return_reg feature.
(test_intrinsic): Call emit_automatics with new feature.
       * config/arm/neon.ml: Update copyright years.
(features): New Fixed_return_reg feature.
(ops): Update feature for Vget_low.

2010-01-19  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

PR target/38697.
* gcc.target/arm/neon/vget_lowf32.c: Regenerate.
* gcc.target/arm/neon/vget_lowp16.c: Likewise.
* gcc.target/arm/neon/vget_lowp8.c:  Likewise.
* gcc.target/arm/neon/vget_lows16.c: Likewise.
* gcc.target/arm/neon/vget_lows32.c: Likewise.
* gcc.target/arm/neon/vget_lows64.c: Likewise.
* gcc.target/arm/neon/vget_lows8.c: Likewise.
* gcc.target/arm/neon/vget_lowu16.c: Likewise.
* gcc.target/arm/neon/vget_lowu32.c: Likewise.
* gcc.target/arm/neon/vget_lowu64.c: Likewise.
* gcc.target/arm/neon/vget_lowu8.c: Likewise.

From-SVN: r156042

15 files changed:
gcc/ChangeLog
gcc/config/arm/neon-testgen.ml
gcc/config/arm/neon.ml
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/neon/vget_lowf32.c
gcc/testsuite/gcc.target/arm/neon/vget_lowp16.c
gcc/testsuite/gcc.target/arm/neon/vget_lowp8.c
gcc/testsuite/gcc.target/arm/neon/vget_lows16.c
gcc/testsuite/gcc.target/arm/neon/vget_lows32.c
gcc/testsuite/gcc.target/arm/neon/vget_lows64.c
gcc/testsuite/gcc.target/arm/neon/vget_lows8.c
gcc/testsuite/gcc.target/arm/neon/vget_lowu16.c
gcc/testsuite/gcc.target/arm/neon/vget_lowu32.c
gcc/testsuite/gcc.target/arm/neon/vget_lowu64.c
gcc/testsuite/gcc.target/arm/neon/vget_lowu8.c

index 18dccd607c77b4b9715c1c44d17ff502e22c27f3..1b5a0d3ec2632dad43046f12626739130f24da97 100644 (file)
@@ -1,3 +1,13 @@
+2010-01-19  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+
+       PR target/38697
+       * config/arm/neon-testgen.m (emit_automatics): New parameter
+       features. Adjust for Fixed_return_reg feature.
+       (test_intrinsic): Call emit_automatics with new feature.
+       * config/arm/neon.ml: Update copyright years.
+       (features): New Fixed_return_reg feature.
+       (ops): Update feature for Vget_low.
+
 2010-01-19  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/42719
index f1c431a384178bdc823419e1b9dbed7007260f71..be86386cbf03646e9e5a304dceedb41c7e5906cc 100644 (file)
@@ -1,5 +1,5 @@
 (* Auto-generate ARM Neon intrinsics tests.
-   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
    Contributed by CodeSourcery.
 
    This file is part of GCC.
@@ -58,7 +58,7 @@ let emit_prologue chan test_name =
 
 (* Emit declarations of local variables that are going to be passed
    to an intrinsic, together with one to take a returned value if needed.  *)
-let emit_automatics chan c_types =
+let emit_automatics chan c_types features =
   let emit () =
     ignore (
       List.fold_left (fun arg_number -> fun (flags, ty) ->
@@ -75,11 +75,17 @@ let emit_automatics chan c_types =
   in
     match c_types with
       (_, return_ty) :: tys ->
-        if return_ty <> "void" then
-          (* The intrinsic returns a value.  *)
-          (Printf.fprintf chan "  %s out_%s;\n" return_ty return_ty;
-           emit ())
-        else
+        if return_ty <> "void" then begin
+          (* The intrinsic returns a value.  We need to do explict register
+             allocation for vget_low tests or they fail because of copy
+             elimination.  *)
+          ((if List.mem Fixed_return_reg features then
+              Printf.fprintf chan "  register %s out_%s asm (\"d18\");\n"
+                             return_ty return_ty
+            else
+              Printf.fprintf chan "  %s out_%s;\n" return_ty return_ty);
+          emit ())
+        end else
           (* The intrinsic does not return a value.  *)
           emit ()
     | _ -> assert false
@@ -257,7 +263,7 @@ let test_intrinsic dir opcode features shape name munge elt_ty =
     (* Emit file and function prologues.  *)
     emit_prologue chan test_name;
     (* Emit local variable declarations.  *)
-    emit_automatics chan c_types;
+    emit_automatics chan c_types features;
     Printf.fprintf chan "\n";
     (* Emit the call to the intrinsic.  *)
     emit_call chan const_valuator c_types name elt_ty;
index 466b06b0fffd639e65e3c9845d5557122411904a..f77f05cc825537186024ebf552d214a74ab5a9ba 100644 (file)
@@ -1,7 +1,7 @@
 (* Common code for ARM NEON header file, documentation and test case
    generators.
 
-   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
    Contributed by CodeSourcery.
 
    This file is part of GCC.
@@ -234,6 +234,7 @@ type features =
        cases.  The function supplied must return the integer to be written
        into the testcase for the argument number (0-based) supplied to it.  *)
   | Const_valuator of (int -> int)
+  | Fixed_return_reg
 
 exception MixedMode of elts * elts
 
@@ -1089,9 +1090,13 @@ let ops =
       Use_operands [| Dreg; Qreg |], "vget_high",
       notype_1, pf_su_8_64;
     Vget_low, [Instruction_name ["vmov"];
-               Disassembles_as [Use_operands [| Dreg; Dreg |]]],
+               Disassembles_as [Use_operands [| Dreg; Dreg |]];
+              Fixed_return_reg],
       Use_operands [| Dreg; Qreg |], "vget_low",
-      notype_1, pf_su_8_64;
+      notype_1, pf_su_8_32;
+     Vget_low, [No_op],
+      Use_operands [| Dreg; Qreg |], "vget_low",
+      notype_1, [S64; U64];
 
     (* Conversions.  *)
     Vcvt, [InfoWord], All (2, Dreg), "vcvt", conv_1,
index 8b7c5eed9bb02b7b3e999a14e271d335d103fc68..8c02782de0ebf300ba08ac0447dbae9916c9b033 100644 (file)
@@ -1,3 +1,18 @@
+2010-01-19  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+
+       PR target/38697.
+       * gcc.target/arm/neon/vget_lowf32.c: Regenerate.
+       * gcc.target/arm/neon/vget_lowp16.c: Likewise.
+       * gcc.target/arm/neon/vget_lowp8.c:  Likewise.
+       * gcc.target/arm/neon/vget_lows16.c: Likewise.
+       * gcc.target/arm/neon/vget_lows32.c: Likewise.
+       * gcc.target/arm/neon/vget_lows64.c: Likewise.
+       * gcc.target/arm/neon/vget_lows8.c: Likewise.
+       * gcc.target/arm/neon/vget_lowu16.c: Likewise.
+       * gcc.target/arm/neon/vget_lowu32.c: Likewise.
+       * gcc.target/arm/neon/vget_lowu64.c: Likewise.
+       * gcc.target/arm/neon/vget_lowu8.c: Likewise.
+
 2010-01-19  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/42545
index ae63430f737958fb92d7c879435dc36907bb7796..a14a57636d0778dbfaff45119c178dbe86afddf9 100644 (file)
@@ -9,7 +9,7 @@
 
 void test_vget_lowf32 (void)
 {
-  float32x2_t out_float32x2_t;
+  register float32x2_t out_float32x2_t asm ("d18");
   float32x4_t arg0_float32x4_t;
 
   out_float32x2_t = vget_low_f32 (arg0_float32x4_t);
index c24ac0cf12a73e67bc34a883da631a0c63e33679..5c130f0b44d4b030e5ec5c6097060bb81cc4b633 100644 (file)
@@ -9,7 +9,7 @@
 
 void test_vget_lowp16 (void)
 {
-  poly16x4_t out_poly16x4_t;
+  register poly16x4_t out_poly16x4_t asm ("d18");
   poly16x8_t arg0_poly16x8_t;
 
   out_poly16x4_t = vget_low_p16 (arg0_poly16x8_t);
index 45d65bcafc1f4462cbd71c64c28854998a09be98..4b4f599fc4e3eb8db351d48a9dfcb4e754ff547b 100644 (file)
@@ -9,7 +9,7 @@
 
 void test_vget_lowp8 (void)
 {
-  poly8x8_t out_poly8x8_t;
+  register poly8x8_t out_poly8x8_t asm ("d18");
   poly8x16_t arg0_poly8x16_t;
 
   out_poly8x8_t = vget_low_p8 (arg0_poly8x16_t);
index 8e6c29aa7fa5569135267f4312d3d1e7bfeea328..ee6e9904b676ee8d839c79577963b3894228c640 100644 (file)
@@ -9,7 +9,7 @@
 
 void test_vget_lows16 (void)
 {
-  int16x4_t out_int16x4_t;
+  register int16x4_t out_int16x4_t asm ("d18");
   int16x8_t arg0_int16x8_t;
 
   out_int16x4_t = vget_low_s16 (arg0_int16x8_t);
index e018afd7faba42985d6ca856fa232522c52518ae..08315286d9b5ebb1a522addba12cf3ade9114626 100644 (file)
@@ -9,7 +9,7 @@
 
 void test_vget_lows32 (void)
 {
-  int32x2_t out_int32x2_t;
+  register int32x2_t out_int32x2_t asm ("d18");
   int32x4_t arg0_int32x4_t;
 
   out_int32x2_t = vget_low_s32 (arg0_int32x4_t);
index e2e2bd66fb9aa7d468aacae4cbf4cc72cec5d0dc..9c1440ceb5bb0fba763ec6f722a490243b4d6c32 100644 (file)
@@ -15,5 +15,4 @@ void test_vget_lows64 (void)
   out_int64x1_t = vget_low_s64 (arg0_int64x2_t);
 }
 
-/* { dg-final { scan-assembler "vmov\[         \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[         \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
 /* { dg-final { cleanup-saved-temps } } */
index 0be24de35e24e32a4acea4af6a2b623d1a0eb914..7d324f33713cdd9f034371c554ea973c8e8c90b1 100644 (file)
@@ -9,7 +9,7 @@
 
 void test_vget_lows8 (void)
 {
-  int8x8_t out_int8x8_t;
+  register int8x8_t out_int8x8_t asm ("d18");
   int8x16_t arg0_int8x16_t;
 
   out_int8x8_t = vget_low_s8 (arg0_int8x16_t);
index 67bcd5090e70885cafdc6ef9a61f5eef7df0a63e..b0c4384531f57b2276dc5e84ea53445b0a148a85 100644 (file)
@@ -9,7 +9,7 @@
 
 void test_vget_lowu16 (void)
 {
-  uint16x4_t out_uint16x4_t;
+  register uint16x4_t out_uint16x4_t asm ("d18");
   uint16x8_t arg0_uint16x8_t;
 
   out_uint16x4_t = vget_low_u16 (arg0_uint16x8_t);
index d21d97acd0122b7c7923c0c7308e842ea0bed4f3..fdd8e79e974a8d1fbf713618256ab0b10ac1641c 100644 (file)
@@ -9,7 +9,7 @@
 
 void test_vget_lowu32 (void)
 {
-  uint32x2_t out_uint32x2_t;
+  register uint32x2_t out_uint32x2_t asm ("d18");
   uint32x4_t arg0_uint32x4_t;
 
   out_uint32x2_t = vget_low_u32 (arg0_uint32x4_t);
index 79cf1c53d20c347348f3d079538759c25b2f6ffb..e6f7627cbd41c50601323e6a38af45c65688c511 100644 (file)
@@ -15,5 +15,4 @@ void test_vget_lowu64 (void)
   out_uint64x1_t = vget_low_u64 (arg0_uint64x2_t);
 }
 
-/* { dg-final { scan-assembler "vmov\[         \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[         \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
 /* { dg-final { cleanup-saved-temps } } */
index 03996493c784fb1e2086316ec4e26eeba2407207..d4e3c714d9351e5589b908c7b66c7914c5ff7f0b 100644 (file)
@@ -9,7 +9,7 @@
 
 void test_vget_lowu8 (void)
 {
-  uint8x8_t out_uint8x8_t;
+  register uint8x8_t out_uint8x8_t asm ("d18");
   uint8x16_t arg0_uint8x16_t;
 
   out_uint8x8_t = vget_low_u8 (arg0_uint8x16_t);