[Bug tree-optimization/106322] tree-vectorize: Wrong code at O2 level (-fno-tree-vectorize is working)

2022-08-09 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106322 --- Comment #25 from Mathieu Malaterre --- (In reply to Martin Liška from comment #24) > > sid64 % g++ *.cc -O2 -m32 && ./a.out > > Please provide output with --verbose. % g++ --verbose *.cc -O2 -m32 && ./a.out Using built-in specs.

[Bug tree-optimization/106322] tree-vectorize: Wrong code at O2 level (-fno-tree-vectorize is working)

2022-08-09 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106322 --- Comment #24 from Martin Liška --- > sid64 % g++ *.cc -O2 -m32 && ./a.out Please provide output with --verbose.

[Bug tree-optimization/106322] tree-vectorize: Wrong code at O2 level (-fno-tree-vectorize is working)

2022-08-09 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106322 --- Comment #23 from Mathieu Malaterre --- Nevermind; I can reproduce the issue with a sid/amd64 chroot: stable64 % schroot -c sid64 sid64 % g++ --version g++ (Debian 12.1.0-7) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc. This is

[Bug tree-optimization/106322] tree-vectorize: Wrong code at O2 level (-fno-tree-vectorize is working)

2022-08-09 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106322 --- Comment #22 from Uroš Bizjak --- (In reply to Martin Liška from comment #20) > Hmm, can't reproduce with x86_64 compiler with -m32: > > $ g++ --version > g++ (SUSE Linux) 12.1.1 20220721 [revision > 4f15d2234608e82159d030dadb17af678cfad626

[Bug tree-optimization/106322] tree-vectorize: Wrong code at O2 level (-fno-tree-vectorize is working)

2022-08-09 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106322 --- Comment #21 from Mathieu Malaterre --- (In reply to Martin Liška from comment #20) > Hmm, can't reproduce with x86_64 compiler with -m32: > > $ g++ --version > g++ (SUSE Linux) 12.1.1 20220721 [revision >

[Bug tree-optimization/106322] tree-vectorize: Wrong code at O2 level (-fno-tree-vectorize is working)

2022-08-09 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106322 --- Comment #20 from Martin Liška --- Hmm, can't reproduce with x86_64 compiler with -m32: $ g++ --version g++ (SUSE Linux) 12.1.1 20220721 [revision 4f15d2234608e82159d030dadb17af678cfad626 ... $ g++ *.cc -O2 -m32 && ./a.out && echo Ok Ok

[Bug tree-optimization/106322] tree-vectorize: Wrong code at O2 level (-fno-tree-vectorize is working)

2022-08-09 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106322 --- Comment #19 from Mathieu Malaterre --- Without hwy dependency: % more Makefile bytes.cc demo.cc :: Makefile :: CXXFLAGS := -O2 demo: demo.o bytes.o $(CXX) $(CXXFLAGS) -o $@ $^ clean: rm -f bytes.o

[Bug tree-optimization/106322] tree-vectorize: Wrong code at O2 level (-fno-tree-vectorize is working)

2022-08-08 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106322 --- Comment #18 from Mathieu Malaterre --- Brushed-up example (with Makefile): % more Makefile bytes.cc demo.cc :: Makefile :: CXXFLAGS := -O2 demo: demo.o bytes.o $(CXX) $(CXXFLAGS) -o $@ $^ -lhwy clean:

[Bug tree-optimization/106322] tree-vectorize: Wrong code at O2 level (-fno-tree-vectorize is working)

2022-08-08 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106322 --- Comment #17 from Mathieu Malaterre --- Created attachment 53424 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53424=edit g++ -save-temps -O2 -o demo demo.cc -lhwy -lhwy_test

[Bug tree-optimization/106322] tree-vectorize: Wrong code at O2 level (-fno-tree-vectorize is working)

2022-08-08 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106322 --- Comment #16 from Mathieu Malaterre --- Simplified version: % cat demo.cc #include "hwy/highway.h" #include "hwy/tests/test_util-inl.h" struct TestMulHigh { template void operator()(T /*unused*/, D d) { const size_t N = 2;

[Bug tree-optimization/106322] tree-vectorize: Wrong code at O2 level (-fno-tree-vectorize is working)

2022-08-05 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106322 --- Comment #15 from Mathieu Malaterre --- (In reply to Mathieu Malaterre from comment #11) > (In reply to Uroš Bizjak from comment #10) > > The reason the test fails with gcc-12 is that gcc-12 enabled > > auto-vectorisation for -O2. > > I can