This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch 0/6] Improve Neon intrinsics a bit


On 30 July 2012 12:41, Ramana Radhakrishnan
<ramana.radhakrishnan@linaro.org> wrote:

> Patch 5 - Bug fix that fixes up a set of ICEs because we were always
> generating vec_duplicate of DImode values into other DImode values.
> Possibly needs backporting to older versions.


The recent changes to the vld1_dup intrinsics ended up generating
(set reg:DI (vec_duplicate:DI  (mem:DI ))). Instead of folding these
out it was simpler just to fix this up in the backend.

Fixes up the failures in vld1_dups/u64 in the new intrinsics tests.
No need for a new test.

Ramana

2012-07-27  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

	* config/arm/neon.md (neon_vld1_dupdi): Split out from the other
	vld1_dup<mode> patterns.
	(neon_vld1_dup<mode> VDX): Change to iterate on VD iterator and
	simplify.
	(neon_vld1_dup<mode> VQ): Cleanup.
---
 gcc/config/arm/neon.md |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
index 7434625..843c907 100644
--- a/gcc/config/arm/neon.md
+++ b/gcc/config/arm/neon.md
@@ -4349,29 +4349,29 @@
 )

 (define_insn "neon_vld1_dup<mode>"
-  [(set (match_operand:VDX 0 "s_register_operand" "=w")
-        (vec_duplicate:VDX (match_operand:<V_elem> 1
"neon_struct_operand" "Um")))]
+  [(set (match_operand:VD 0 "s_register_operand" "=w")
+        (vec_duplicate:VD (match_operand:<V_elem> 1
"neon_struct_operand" "Um")))]
   "TARGET_NEON"
-{
-  if (GET_MODE_NUNITS (<MODE>mode) > 1)
-    return "vld1.<V_sz_elem>\t{%P0[]}, %A1";
-  else
-    return "vld1.<V_sz_elem>\t%h0, %A1";
-}
-  [(set (attr "neon_type")
-      (if_then_else (gt (const_string "<V_mode_nunits>") (const_string "1"))
-                    (const_string "neon_vld2_2_regs_vld1_vld2_all_lanes")
-                    (const_string "neon_vld1_1_2_regs")))]
+  "vld1.<V_sz_elem>\t{%P0[]}, %A1";
+  [(set_attr "neon_type" "neon_vld1_1_2_regs")]
+)
+
+;; This has been split from the others because vld1_dupdi is the same
+;; as a DImode move and it is meaningless to vec_duplicate a DImode value into
+;; a DImode value.
+(define_expand "neon_vld1_dupdi"
+  [(set (match_operand:DI 0 "s_register_operand" "")
+  	(match_operand:DI 1 "neon_struct_operand" ""))]
+ "TARGET_NEON"
+ ""
 )

 (define_insn "neon_vld1_dup<mode>"
   [(set (match_operand:VQ 0 "s_register_operand" "=w")
         (vec_duplicate:VQ (match_operand:<V_elem> 1
"neon_struct_operand" "Um")))]
   "TARGET_NEON"
-{
-  return "vld1.<V_sz_elem>\t{%e0[], %f0[]}, %A1";
-}
-  [(set_attr "neon_type" "neon_vld2_2_regs_vld1_vld2_all_lanes")]
+ "vld1.<V_sz_elem>\t{%e0[], %f0[]}, %A1"
+ [(set_attr "neon_type" "neon_vld2_2_regs_vld1_vld2_all_lanes")]
 )

 (define_insn_and_split "neon_vld1_dupv2di"
-- 
1.7.4.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]