public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/98381] New: Wrong code with -O3 -march=skylake-avx512
@ 2020-12-18 20:03 vsevolod.livinskij at frtk dot ru
  2020-12-19 14:18 ` [Bug tree-optimization/98381] [11 Regression] Wrong code with -O3 -march=skylake-avx512 by r11-3072 hjl.tools at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: vsevolod.livinskij at frtk dot ru @ 2020-12-18 20:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98381
           Summary: Wrong code with -O3 -march=skylake-avx512
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vsevolod.livinskij at frtk dot ru
  Target Milestone: ---

Reproducer:
//func.cpp
extern bool var_22;
void test(long long a, unsigned b, unsigned long long c) {
  for (long i = 0; i < 16; i += 1ULL)
    if (a)
      var_22 = 5023804122334ULL >= (char)c;
}

//driver.cpp 
#include <stdio.h>
long long int a = -2161098602020439353LL;
unsigned int b = 1621447385U;
unsigned long long int c = 16505450185101189749ULL;
bool var_22 = (bool)0;

void test(long long int a, unsigned int b, unsigned long long int c);

int main() {
    test(a, b, c);
    printf("%d\n", (int)var_22);
}

Error:
>$ g++ -O3 -march=skylake-avx512 func.cpp driver.cpp && sde -skx -- ./a.out
0
>$ g++ -O0 func.cpp driver.cpp && sde -skx -- ./a.out
1

gcc version 11.0.0 20201217 (6f8486523f61bf0aa476dfa4197d1e3b71a0a8f3) (GCC)

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

* [Bug tree-optimization/98381] [11 Regression] Wrong code with -O3 -march=skylake-avx512 by r11-3072
  2020-12-18 20:03 [Bug tree-optimization/98381] New: Wrong code with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
@ 2020-12-19 14:18 ` hjl.tools at gmail dot com
  2020-12-21  8:29 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2020-12-19 14:18 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenther at suse dot de
   Last reconfirmed|                            |2020-12-19
            Summary|Wrong code with -O3         |[11 Regression] Wrong code
                   |-march=skylake-avx512       |with -O3
                   |                            |-march=skylake-avx512 by
                   |                            |r11-3072
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Target Milestone|---                         |11.0

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
It is caused by r11-3072.

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

* [Bug tree-optimization/98381] [11 Regression] Wrong code with -O3 -march=skylake-avx512 by r11-3072
  2020-12-18 20:03 [Bug tree-optimization/98381] New: Wrong code with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
  2020-12-19 14:18 ` [Bug tree-optimization/98381] [11 Regression] Wrong code with -O3 -march=skylake-avx512 by r11-3072 hjl.tools at gmail dot com
@ 2020-12-21  8:29 ` marxin at gcc dot gnu.org
  2021-01-04  9:03 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-21  8:29 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |11.0
           Priority|P3                          |P1

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

* [Bug tree-optimization/98381] [11 Regression] Wrong code with -O3 -march=skylake-avx512 by r11-3072
  2020-12-18 20:03 [Bug tree-optimization/98381] New: Wrong code with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
  2020-12-19 14:18 ` [Bug tree-optimization/98381] [11 Regression] Wrong code with -O3 -march=skylake-avx512 by r11-3072 hjl.tools at gmail dot com
  2020-12-21  8:29 ` marxin at gcc dot gnu.org
@ 2021-01-04  9:03 ` rguenth at gcc dot gnu.org
  2021-01-05 14:54 ` cvs-commit at gcc dot gnu.org
  2021-01-05 14:56 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-04  9:03 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.

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

* [Bug tree-optimization/98381] [11 Regression] Wrong code with -O3 -march=skylake-avx512 by r11-3072
  2020-12-18 20:03 [Bug tree-optimization/98381] New: Wrong code with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
                   ` (2 preceding siblings ...)
  2021-01-04  9:03 ` rguenth at gcc dot gnu.org
@ 2021-01-05 14:54 ` cvs-commit at gcc dot gnu.org
  2021-01-05 14:56 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-05 14:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:01da03c915f086fb9aa36b809c1a06a9f661533b

commit r11-6468-g01da03c915f086fb9aa36b809c1a06a9f661533b
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Jan 5 14:23:55 2021 +0100

    tree-optimization/98381 - fix live bool vector extract

    This fixes extraction of live bool vector results for the case of
    integer mode vectors.

    2021-01-05  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/98381
            * tree.c (vector_element_bits): Properly compute bool vector
            element size.
            * tree-vect-loop.c (vectorizable_live_operation): Properly
            compute the last lane bit offset.

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

* [Bug tree-optimization/98381] [11 Regression] Wrong code with -O3 -march=skylake-avx512 by r11-3072
  2020-12-18 20:03 [Bug tree-optimization/98381] New: Wrong code with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
                   ` (3 preceding siblings ...)
  2021-01-05 14:54 ` cvs-commit at gcc dot gnu.org
@ 2021-01-05 14:56 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-05 14:56 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-01-05 14:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-18 20:03 [Bug tree-optimization/98381] New: Wrong code with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
2020-12-19 14:18 ` [Bug tree-optimization/98381] [11 Regression] Wrong code with -O3 -march=skylake-avx512 by r11-3072 hjl.tools at gmail dot com
2020-12-21  8:29 ` marxin at gcc dot gnu.org
2021-01-04  9:03 ` rguenth at gcc dot gnu.org
2021-01-05 14:54 ` cvs-commit at gcc dot gnu.org
2021-01-05 14:56 ` rguenth 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).