This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/51485] New: [4.6/4.7 Regression] ICE in vectorizable_statement
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 09 Dec 2011 11:42:27 +0000
- Subject: [Bug tree-optimization/51485] New: [4.6/4.7 Regression] ICE in vectorizable_statement
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51485
Bug #: 51485
Summary: [4.6/4.7 Regression] ICE in vectorizable_statement
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: jakub@gcc.gnu.org
ReportedBy: jakub@gcc.gnu.org
Target: x86_64-linux
struct A { A (); unsigned int a; };
double bar (A a) throw () __attribute__((pure));
void
foo (unsigned int x, double *y, A *z)
{
unsigned int i;
for (i = 0; i < x; i++)
y[i] = bar (z[i]);
}
ICEs at -O3, because GIMPLE_CALL has a single data ref (on the argument),
and gets vectype of that (V4SImode). But later on when determining
vectorization factor we don't look at vectype, but for calls just at
gimple_expr_type, i.e. the DFmode return type of the call and thus we end up
with vectorization factor 2.
And in vectorizable_assignment the vectype has 4 nunits, so we end up with
ncopies 0 and ICE on it. Of course the call isn't vectorizable, so we should
bail out on it earlier.
Started failing with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158157