public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][armeb] PR 91060 gcc.c-torture/execute/scal-to-vec1.c fails since r272843
@ 2019-07-08  9:04 Christophe Lyon
  2019-07-08  9:06 ` Richard Sandiford
  2019-07-08  9:09 ` Kyrill Tkachov
  0 siblings, 2 replies; 7+ messages in thread
From: Christophe Lyon @ 2019-07-08  9:04 UTC (permalink / raw)
  To: gcc Patches, Richard Biener, Richard Sandiford

[-- Attachment #1: Type: text/plain, Size: 179 bytes --]

Hi,

This patch fixes PR 91060 where the lane ordering was no longer the
right one (GCC's vs architecture's).

OK?

Thanks to both Richards for most of the debugging!

Christophe

[-- Attachment #2: pr91060.chlog.txt --]
[-- Type: text/plain, Size: 191 bytes --]

gcc/ChangeLog:

2019-07-08  Christophe Lyon  <christophe.lyon@linaro.org>

	PR target/91060
	* config/arm/arm.c (neon_expand_vector_init): Use
	vec_set*_internal instead of neon_vset_lane*.


[-- Attachment #3: pr91060.patch.txt --]
[-- Type: text/plain, Size: 2083 bytes --]

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 820502a..4c7b5a8 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -12471,7 +12471,7 @@ neon_expand_vector_init (rtx target, rtx vals)
   if (n_var == 1)
     {
       rtx copy = copy_rtx (vals);
-      rtx index = GEN_INT (one_var);
+      rtx index = GEN_INT (1 << one_var);
 
       /* Load constant part of vector, substitute neighboring value for
 	 varying element.  */
@@ -12483,31 +12483,31 @@ neon_expand_vector_init (rtx target, rtx vals)
       switch (mode)
 	{
 	case E_V8QImode:
-	  emit_insn (gen_neon_vset_lanev8qi (target, x, target, index));
+	  emit_insn (gen_vec_setv8qi_internal (target, x, index, target));
 	  break;
 	case E_V16QImode:
-	  emit_insn (gen_neon_vset_lanev16qi (target, x, target, index));
+	  emit_insn (gen_vec_setv16qi_internal (target, x, index, target));
 	  break;
 	case E_V4HImode:
-	  emit_insn (gen_neon_vset_lanev4hi (target, x, target, index));
+	  emit_insn (gen_vec_setv4hi_internal (target, x, index, target));
 	  break;
 	case E_V8HImode:
-	  emit_insn (gen_neon_vset_lanev8hi (target, x, target, index));
+	  emit_insn (gen_vec_setv8hi_internal (target, x, index, target));
 	  break;
 	case E_V2SImode:
-	  emit_insn (gen_neon_vset_lanev2si (target, x, target, index));
+	  emit_insn (gen_vec_setv2si_internal (target, x, index, target));
 	  break;
 	case E_V4SImode:
-	  emit_insn (gen_neon_vset_lanev4si (target, x, target, index));
+	  emit_insn (gen_vec_setv4si_internal (target, x, index, target));
 	  break;
 	case E_V2SFmode:
-	  emit_insn (gen_neon_vset_lanev2sf (target, x, target, index));
+	  emit_insn (gen_vec_setv2sf_internal (target, x, index, target));
 	  break;
 	case E_V4SFmode:
-	  emit_insn (gen_neon_vset_lanev4sf (target, x, target, index));
+	  emit_insn (gen_vec_setv4sf_internal (target, x, index, target));
 	  break;
 	case E_V2DImode:
-	  emit_insn (gen_neon_vset_lanev2di (target, x, target, index));
+	  emit_insn (gen_vec_setv2di_internal (target, x, index, target));
 	  break;
 	default:
 	  gcc_unreachable ();

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-07-10 11:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08  9:04 [PATCH][armeb] PR 91060 gcc.c-torture/execute/scal-to-vec1.c fails since r272843 Christophe Lyon
2019-07-08  9:06 ` Richard Sandiford
2019-07-08  9:10   ` Christophe Lyon
2019-07-10 10:20     ` Richard Sandiford
2019-07-10 11:25       ` Ramana Radhakrishnan
2019-07-08  9:09 ` Kyrill Tkachov
2019-07-08  9:16   ` Christophe Lyon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).