Bug 71655 - [7 Regression] GCC trunk ICE on westmere target
Summary: [7 Regression] GCC trunk ICE on westmere target
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 7.0
: P3 normal
Target Milestone: 7.0
Assignee: Ilya Enkovich
URL:
Keywords:
Depends on:
Blocks: yarpgen 71488
  Show dependency treegraph
 
Reported: 2016-06-24 19:35 UTC by Anton Mitrokhin
Modified: 2021-11-01 23:07 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2016-06-27 00:00:00


Attachments
Reproducer (438 bytes, text/x-csrc)
2016-06-24 19:35 UTC, Anton Mitrokhin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Mitrokhin 2016-06-24 19:35:24 UTC
Created attachment 38766 [details]
Reproducer

Reproducer:
> g++ -std=c++11 -Ofast -march=westmere -o out -c crash.cpp


Output:
crash.cpp: In function 'void fn1()':
crash.cpp:11:6: internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1527
 void fn1() {
      ^~~
0xf302ef vect_get_vec_def_for_stmt_copy(vect_def_type, tree_node*)
        /export/users/gnutester/stability/svn/trunk/gcc/tree-vect-stmts.c:1527
0xf3ee02 vectorizable_comparison
        /export/users/gnutester/stability/svn/trunk/gcc/tree-vect-stmts.c:7938
0xf4ceab vect_transform_stmt(gimple*, gimple_stmt_iterator*, bool*, _slp_tree*, _slp_instance*)
        /export/users/gnutester/stability/svn/trunk/gcc/tree-vect-stmts.c:8337
0xf53db5 vect_transform_loop(_loop_vec_info*)
        /export/users/gnutester/stability/svn/trunk/gcc/tree-vect-loop.c:6893
0xf70cfe vectorize_loops()
        /export/users/gnutester/stability/svn/trunk/gcc/tree-vectorizer.c:554
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.




> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/export/users/amitrokh/gcc_trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /export/users/gnutester/stability/svn/trunk/configure --with-arch=corei7 --with-cpu=corei7 --enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld --enable-cloog-backend=isl --with-fh-pkgversion=Revision=237716/svn-rev:237719/ --prefix=/export/users/gnutester/stability/work/trunk/64/install --enable-languages=c,c++,fortran,java,lto
Thread model: posix
gcc version 7.0.0 20160622 (experimental) (Revision=237716/svn-rev:237719/)
Comment 1 Ilya Enkovich 2016-06-27 16:33:15 UTC
Confirm.  Caused by r237706.
Comment 2 Ilya Enkovich 2016-06-29 12:27:12 UTC
Author: ienkovich
Date: Wed Jun 29 12:26:40 2016
New Revision: 237846

URL: https://gcc.gnu.org/viewcvs?rev=237846&root=gcc&view=rev
Log:
gcc/

	PR tree-optimization/71655
	* tree-vect-stmts.c (vectorizable_comparison): Swap definition
	types when swapping operands.

gcc/testsuite/

	PR tree-optimization/71655
	* g++.dg/pr71655.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/pr71655.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-stmts.c
Comment 3 Ilya Enkovich 2016-06-29 12:27:37 UTC
Fixed