Bug 85255 - [8 Regression] wrong code with -O2 -fno-tree-fre -mavx512f
Summary: [8 Regression] wrong code with -O2 -fno-tree-fre -mavx512f
Status: RESOLVED DUPLICATE of bug 85177
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 8.0.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2018-04-06 12:30 UTC by Zdenek Sojka
Modified: 2018-04-10 12:38 UTC (History)
1 user (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work:
Known to fail: 8.0.1
Last reconfirmed:


Attachments
reduced testcase (178 bytes, text/plain)
2018-04-06 12:30 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2018-04-06 12:30:45 UTC
Created attachment 43870 [details]
reduced testcase

Output:
$ x86_64-pc-linux-gnu-gcc -O2 -fno-tree-fre -mavx512f testcase.c
$ sde64 -- ./a.out
Aborted

The call to foo() is omitted; v[] == {1, 0, 0, 0, ....} instead of {0, 0, 0, ...}

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-259161-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-259161-checking-yes-rtl-df-extra-amd64
Thread model: posix
gcc version 8.0.1 20180406 (experimental) (GCC)
Comment 1 Jakub Jelinek 2018-04-06 13:48:38 UTC
Dup.  I've added testcase from this PR into my patch, still waiting for review.

*** This bug has been marked as a duplicate of bug 85177 ***
Comment 2 Jakub Jelinek 2018-04-10 12:38:09 UTC
Author: jakub
Date: Tue Apr 10 12:37:36 2018
New Revision: 259269

URL: https://gcc.gnu.org/viewcvs?rev=259269&root=gcc&view=rev
Log:
	PR target/85177
	PR target/85255
	* config/i386/sse.md
	(<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
	computation of the VEC_MERGE selector from mask.
	(<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
	Fix decoding of the VEC_MERGE selector into mask.

	* gcc.target/i386/avx512f-pr85177.c: New test.
	* gcc.target/i386/avx512f-pr85255.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/i386/avx512f-pr85177.c
    trunk/gcc/testsuite/gcc.target/i386/avx512f-pr85255.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/sse.md
    trunk/gcc/testsuite/ChangeLog