public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/63211] New: gcc.target/i386/avx2-*.c tests use broken type-punning
@ 2014-09-09  8:49 rguenth at gcc dot gnu.org
  2014-10-31 11:28 ` [Bug testsuite/63211] " ubizjak at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-09-09  8:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63211

            Bug ID: 63211
           Summary: gcc.target/i386/avx2-*.c tests use broken type-punning
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
            Target: x86_64-*-*, i?86-*-*

For example gcc.target/i386/avx2-vpblendd128-2.c does

static void
init_pblendd128 (int *src1, int *src2, int seed)
{
  int i, sign = 1;

  for (i = 0; i < 4; i++)
    {
      src1[i] = (i + seed) * (i + seed) * sign;
      src2[i] = (i + seed + 20) * sign;
      sign = -sign;
    }
}
...
static void
avx2_test (void)
{
  union128i_d src1, src2, dst;
  int dst_ref[4];
  int i;

  for (i = 0; i < NUM; i++)
    {
      init_pblendd128 (src1.a, src2.a, i);

      dst.x = _mm_blend_epi32 (src1.x, src2.x, MASK);

which stores to src1.a/src2.a via a pointer and not a direct union access.

This makes us optimize away the init_pblendd128 function after it being
inlined.

FAIL: gcc.target/i386/avx2-vpblendd128-2.c execution test
FAIL: gcc.target/i386/avx2-vpblendd256-2.c execution test
FAIL: gcc.target/i386/avx2-vpblendw-2.c execution test
FAIL: gcc.target/i386/avx2-vpbroadcastd128-2.c execution test
FAIL: gcc.target/i386/avx2-vpbroadcastd256-2.c execution test
FAIL: gcc.target/i386/avx2-vpbroadcastw128-2.c execution test
FAIL: gcc.target/i386/avx2-vpbroadcastw256-2.c execution test
FAIL: gcc.target/i386/avx2-vpermd-2.c execution test
FAIL: gcc.target/i386/avx2-vpermps-2.c execution test
FAIL: gcc.target/i386/avx2-vpmaxsd-2.c execution test
FAIL: gcc.target/i386/avx2-vpmaxsw-2.c execution test
FAIL: gcc.target/i386/avx2-vpmaxud-2.c execution test
FAIL: gcc.target/i386/avx2-vpmaxuw-2.c execution test
FAIL: gcc.target/i386/avx2-vpminsd-2.c execution test
FAIL: gcc.target/i386/avx2-vpminsw-2.c execution test
FAIL: gcc.target/i386/avx2-vpminud-2.c execution test
FAIL: gcc.target/i386/avx2-vpminuw-2.c execution test
FAIL: gcc.target/i386/avx2-vpmuldq-2.c execution test
FAIL: gcc.target/i386/avx2-vpmulhrsw-2.c execution test
FAIL: gcc.target/i386/avx2-vpmulhuw-2.c execution test
FAIL: gcc.target/i386/avx2-vpmulhw-2.c execution test
FAIL: gcc.target/i386/avx2-vpmulld-2.c execution test
FAIL: gcc.target/i386/avx2-vpmullw-2.c execution test
FAIL: gcc.target/i386/avx2-vpmuludq-2.c execution test
FAIL: gcc.target/i386/avx2-vpshufd-2.c execution test
FAIL: gcc.target/i386/avx2-vpshufhw-2.c execution test
FAIL: gcc.target/i386/avx2-vpshuflw-2.c execution test
FAIL: gcc.target/i386/avx2-vpsignd-2.c execution test
FAIL: gcc.target/i386/avx2-vpsignw-2.c execution test
FAIL: gcc.target/i386/avx2-vpslld-2.c execution test
FAIL: gcc.target/i386/avx2-vpsllvd128-2.c execution test
FAIL: gcc.target/i386/avx2-vpsllvd256-2.c execution test
FAIL: gcc.target/i386/avx2-vpsllw-2.c execution test
FAIL: gcc.target/i386/avx2-vpsrad-2.c execution test
FAIL: gcc.target/i386/avx2-vpsravd128-2.c execution test
FAIL: gcc.target/i386/avx2-vpsravd256-2.c execution test
FAIL: gcc.target/i386/avx2-vpsraw-2.c execution test
FAIL: gcc.target/i386/avx2-vpsrld-2.c execution test
FAIL: gcc.target/i386/avx2-vpsrlvd128-2.c execution test
FAIL: gcc.target/i386/avx2-vpsrlvd256-2.c execution test
FAIL: gcc.target/i386/avx2-vpsrlw-2.c execution test
FAIL: gcc.target/i386/avx2-vpunpckhdq-2.c execution test
FAIL: gcc.target/i386/avx2-vpunpckhwd-2.c execution test
FAIL: gcc.target/i386/avx2-vpunpckldq-2.c execution test
FAIL: gcc.target/i386/avx2-vpunpcklwd-2.c execution test

the actual miscompile only happens if you apply the fix for PR40135, the
testcases are broken nevertheless according to how type-punning through
unions is supposed to work.


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

* [Bug testsuite/63211] gcc.target/i386/avx2-*.c tests use broken type-punning
  2014-09-09  8:49 [Bug testsuite/63211] New: gcc.target/i386/avx2-*.c tests use broken type-punning rguenth at gcc dot gnu.org
@ 2014-10-31 11:28 ` ubizjak at gmail dot com
  2014-11-05 19:05 ` kyukhin at gcc dot gnu.org
  2021-08-28 19:10 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ubizjak at gmail dot com @ 2014-10-31 11:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63211

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kyukhin at gcc dot gnu.org

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
Adding CC.
>From gcc-bugs-return-465481-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Oct 31 11:28:18 2014
Return-Path: <gcc-bugs-return-465481-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 15865 invoked by alias); 31 Oct 2014 11:28:17 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 15827 invoked by uid 48); 31 Oct 2014 11:28:14 -0000
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/63695] [5 Regression] Bootstrapping with Ada is broken at r216942
Date: Fri, 31 Oct 2014 11:33:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dominiq at lps dot ens.fr
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-63695-4-qFdNcaEb7c@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63695-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63695-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-10/txt/msg02502.txt.bz2
Content-length: 373

https://gcc.gnu.org/bugzilla/show_bug.cgi?idc695

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> OK, so this confirms my suspicion: you had an unsuitable snapshot as your
> Ada bootstrap compiler.
>
> Arno

Well, this does not answer my underlying question: what made my bootstrap
compiler unsuitable after the batch of commits circa 216930?


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

* [Bug testsuite/63211] gcc.target/i386/avx2-*.c tests use broken type-punning
  2014-09-09  8:49 [Bug testsuite/63211] New: gcc.target/i386/avx2-*.c tests use broken type-punning rguenth at gcc dot gnu.org
  2014-10-31 11:28 ` [Bug testsuite/63211] " ubizjak at gmail dot com
@ 2014-11-05 19:05 ` kyukhin at gcc dot gnu.org
  2021-08-28 19:10 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: kyukhin at gcc dot gnu.org @ 2014-11-05 19:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63211

--- Comment #2 from Kirill Yukhin <kyukhin at gcc dot gnu.org> ---
Confirmed. We'll fix that.


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

* [Bug testsuite/63211] gcc.target/i386/avx2-*.c tests use broken type-punning
  2014-09-09  8:49 [Bug testsuite/63211] New: gcc.target/i386/avx2-*.c tests use broken type-punning rguenth at gcc dot gnu.org
  2014-10-31 11:28 ` [Bug testsuite/63211] " ubizjak at gmail dot com
  2014-11-05 19:05 ` kyukhin at gcc dot gnu.org
@ 2021-08-28 19:10 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-28 19:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63211

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-08-28
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |internal-improvement

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The testcases don't fail but the code is still broken as of today.

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

end of thread, other threads:[~2021-08-28 19:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-09  8:49 [Bug testsuite/63211] New: gcc.target/i386/avx2-*.c tests use broken type-punning rguenth at gcc dot gnu.org
2014-10-31 11:28 ` [Bug testsuite/63211] " ubizjak at gmail dot com
2014-11-05 19:05 ` kyukhin at gcc dot gnu.org
2021-08-28 19:10 ` pinskia at gcc dot gnu.org

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).