public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/95401] New: GCC produces incorrect instruction with -O3 for skylake-avx512
@ 2020-05-29  5:18 vsevolod.livinskij at frtk dot ru
  2020-05-29  7:08 ` [Bug tree-optimization/95401] GCC produces incorrect instruction with -O3 for AVX2 rguenth at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: vsevolod.livinskij at frtk dot ru @ 2020-05-29  5:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95401
           Summary: GCC produces incorrect instruction with -O3 for
                    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: ---

GCC produces incorrect instruction with -O3 for skylake-avx512 (also for
icelake-server and tigerlake).

Error:
>$ g++ -O3 func.cpp driver.cpp -march=skylake-avx512 && sde -skx -- ./a.out 
SDE ERROR:  TID: 0 executed instruction with an unaligned memory reference to
address 0x404064 INSTR: 0x000401201: IFORM: VMOVDQA_MEMdq_XMMdq :: vmovdqa
xmmword ptr [rcx*4+0x404060], xmm0
        IMAGE:   
/home/vlivinsk/workspace/yarpgen/bugs/may-28/gcc-miscompile/reduce/a.out
        FUNCTION: _Z4testv
        FUNCTION ADDR: 0x000401120

Reproducer:
driver.cpp
int var_9 = 1693986256, var_14;
int arr_16[11];
void test();
int main() { test(); }

func.cpp
extern int var_9;
extern unsigned var_14;
extern int arr_16[];
#include <algorithm>
void test() {
  for (short a = 0; a < (short)var_9; a += 12140)
    for (short b = 0; b < 8; b++)
      if (std::max(var_14, 1U))
        arr_16[a + b] = 0;
}

GCC version: 11.0.0 (5c715e6a2990cfb6c15acc1ee14219523534ec69)

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

end of thread, other threads:[~2021-03-11  7:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29  5:18 [Bug tree-optimization/95401] New: GCC produces incorrect instruction with -O3 for skylake-avx512 vsevolod.livinskij at frtk dot ru
2020-05-29  7:08 ` [Bug tree-optimization/95401] GCC produces incorrect instruction with -O3 for AVX2 rguenth at gcc dot gnu.org
2020-05-29  7:16 ` [Bug tree-optimization/95401] [10/11 Regression] GCC produces incorrect instruction with -O3 for AVX2 since r10-2257-g868363d4f52df19d marxin at gcc dot gnu.org
2020-05-29  7:31 ` rguenth at gcc dot gnu.org
2020-07-23  6:51 ` rguenth at gcc dot gnu.org
2020-12-30 13:36 ` rsandifo at gcc dot gnu.org
2021-01-05 10:59 ` [Bug tree-optimization/95401] [10 " rsandifo at gcc dot gnu.org
2021-01-12 10:06 ` rsandifo at gcc dot gnu.org
2021-03-05  5:10 ` aoliva at gcc dot gnu.org
2021-03-05  8:03 ` rguenth at gcc dot gnu.org
2021-03-11  7:00 ` aoliva 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).