public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Vladimir Makarov <vmakarov@redhat.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [committed] testsuite: Fix up pr104637 testcase [PR104637]
Date: Wed, 2 Mar 2022 11:09:31 +0100	[thread overview]
Message-ID: <Yh9CW5ON0oEjzMu+@tucnak> (raw)
In-Reply-To: <4a0082c6-822f-9051-8fbe-8bd5b3e7372f@redhat.com>

Hi!

On Mon, Feb 28, 2022 at 04:49:08PM -0500, Vladimir Makarov via Gcc-patches wrote:
>             PR rtl-optimization/104637
>             * gcc.target/i386/pr104637.c: New.

This testcase FAILs everywhere for 3 reasons:
1) the testcase can't work on ia32, where sizeof (long double) == 12
   and as it is not a power of 2, we disallow creating vectors with such
   elements, -mx32 and -m64 are fine
2) the testcase emits a lot of -Wdiv-by-zero warnings, I've just added
   -Wno-div-by-zero to dg-options
3) my fault, when tweaking the testcase I've missed 33 initializers of
   a 32 element vector which didn't change anything on the ICE, but is
   still reported

This patch fixes all of it, tested with
RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} i386.exp=pr104637.c'
both without the LRA fix where it ICEs and with it where it passes
everywhere.  Committed to trunk as obvious.

2022-03-02  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/104637
	* gcc.target/i386/pr104637.c: Don't run on ia32.  Add -Wno-div-by-zero
	to dg-options.
	(foo): Remove extraneous initializer.

--- gcc/testsuite/gcc.target/i386/pr104637.c.jj	2022-03-01 19:42:39.362262443 +0100
+++ gcc/testsuite/gcc.target/i386/pr104637.c	2022-03-02 10:52:43.943775712 +0100
@@ -1,5 +1,5 @@
-/* { dg-do compile } */
-/* { dg-options "-Og -fno-forward-propagate -mavx" } */
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-Og -fno-forward-propagate -mavx -Wno-div-by-zero" } */
 
 typedef short __attribute__((__vector_size__ (64))) U;
 typedef unsigned long long __attribute__((__vector_size__ (32))) V;
@@ -13,7 +13,7 @@ void
 foo (char a, char b, _Complex char c, V v)
 {
   u = (U) { u[0] / 0, u[1] / 0, u[2] / 0, u[3] / 0, u[4] / 0, u[5] / 0, u[6] / 0, u[7] / 0,
-	    u[8] / 0, u[0] / 0, u[9] / 0, u[10] / 0, u[11] / 0, u[12] / 0, u[13] / 0, u[14] / 0, u[15] / 0,
+	    u[8] / 0, u[9] / 0, u[10] / 0, u[11] / 0, u[12] / 0, u[13] / 0, u[14] / 0, u[15] / 0,
 	    u[16] / 0, u[17] / 0, u[18] / 0, u[19] / 0, u[20] / 0, u[21] / 0, u[22] / 0, u[23] / 0,
 	    u[24] / 0, u[25] / 0, u[26] / 0, u[27] / 0, u[28] / 0, u[29] / 0, u[30] / 0, u[31] / 0 };
   c += i;


	Jakub


      reply	other threads:[~2022-03-02 10:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 21:49 [committed] [PR104637] LRA: Split hard regs as many as possible on one subpass Vladimir Makarov
2022-03-02 10:09 ` Jakub Jelinek [this message]

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=Yh9CW5ON0oEjzMu+@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=vmakarov@redhat.com \
    /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).