public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christophe Lyon <christophe.lyon@linaro.org>
To: gcc Patches <gcc-patches@gcc.gnu.org>,
	Richard Biener <rguenther@suse.de>,
		Richard Sandiford <Richard.Sandiford@arm.com>
Subject: [PATCH][armeb] PR 91060 gcc.c-torture/execute/scal-to-vec1.c fails since r272843
Date: Mon, 08 Jul 2019 09:04:00 -0000	[thread overview]
Message-ID: <CAKdteOY2Y-HNAMabBkKDo_t8gSyATTyyhvYDv8o3KScnJ5iZEQ@mail.gmail.com> (raw)

[-- 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 ();

             reply	other threads:[~2019-07-08  9:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08  9:04 Christophe Lyon [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKdteOY2Y-HNAMabBkKDo_t8gSyATTyyhvYDv8o3KScnJ5iZEQ@mail.gmail.com \
    --to=christophe.lyon@linaro.org \
    --cc=Richard.Sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).