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

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