Bug 86036 - [9 Regression] wrong code with -mavx512bw
Summary: [9 Regression] wrong code with -mavx512bw
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 9.0
: P3 normal
Target Milestone: 9.0
Assignee: Jakub Jelinek
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2018-06-03 18:28 UTC by Zdenek Sojka
Modified: 2018-06-04 13:51 UTC (History)
1 user (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work: 8.1.1
Known to fail: 9.0
Last reconfirmed: 2018-06-04 00:00:00


Attachments
reduced testcase (153 bytes, text/plain)
2018-06-03 18:28 UTC, Zdenek Sojka
Details
gcc9-pr85832.patch (1.21 KB, patch)
2018-06-04 09:53 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2018-06-03 18:28:13 UTC
Created attachment 44226 [details]
reduced testcase

Output:
$ x86_64-pc-linux-gnu-gcc -O -mavx512bw testcase.c
$ sde64 -- ./a.out
Aborted


$ 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-261129-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/9.0.0/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 --disable-bootstrap --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-261129-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
gcc version 9.0.0 20180603 (experimental) (GCC)
Comment 1 Jakub Jelinek 2018-06-04 08:20:44 UTC
Broken with the PR85832 change.
Comment 2 Jakub Jelinek 2018-06-04 09:53:25 UTC
Created attachment 44228 [details]
gcc9-pr85832.patch

Untested fix.
Comment 3 Jakub Jelinek 2018-06-04 13:50:27 UTC
Author: jakub
Date: Mon Jun  4 13:49:55 2018
New Revision: 261148

URL: https://gcc.gnu.org/viewcvs?rev=261148&root=gcc&view=rev
Log:
	PR target/85832
	PR target/86036
	* config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
	Use vptestnm rather than vptestm in (=Yc,v,C) variant.

	* gcc.target/i386/avx512f-pr85832.c: Expect vptestnm rather than
	vptestm.
	* gcc.target/i386/avx512vl-pr85832.c: Likewise.
	* gcc.target/i386/avx512vlbw-pr85832.c: Likewise.
	* gcc.target/i386/avx512bw-pr85832.c: Likewise.
	* gcc.target/i386/avx512bw-pr86036.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/i386/avx512bw-pr86036.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/sse.md
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/i386/avx512bw-pr85832.c
    trunk/gcc/testsuite/gcc.target/i386/avx512f-pr85832.c
    trunk/gcc/testsuite/gcc.target/i386/avx512vl-pr85832.c
    trunk/gcc/testsuite/gcc.target/i386/avx512vlbw-pr85832.c
Comment 4 Jakub Jelinek 2018-06-04 13:51:52 UTC
Should be fixed now.