On machines with only a vector/vector shift like the powerpc and spu, the wrong type is generated for the tree vector that is created with the constant splat'ed to fill the vector. The problem is the code uses get_vectype_for_scalar_type, and integer constants don't have a type. So get_vectype_for_scalar_type returns V4SI, even if the vector in question is V8HI or V16QI. Before the added type validation was added on April 27th, this appeared to work because nothing looked at the type field. With the current code, this can lead to incorrect code being generated, and for larger programs the compiler will die due to garbage collection failure.
-- Summary: Incorrect tree made for vector shifted by constant on powerpc, spu Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: meissner at linux dot vnet dot ibm dot com GCC build triplet: powerpc64-unknown-linux-gnu GCC host triplet: powerpc64-unknown-linux-gnu GCC target triplet: powerpc64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40049