http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50353
Bug #: 50353 Summary: vec_set not used for vector indexing Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: amyl...@gcc.gnu.org The code in c-typeck.c:build_array_ref that handles indexing of vector types unconditionally calls c_common_mark_addressable_vec, thus disabling the use of target-supplied vec_set patterns. E.g.: typedef float f2 __attribute__((vector_size(8))); f2 f (f2 in) { f2 tmp; tmp[0] = 3; tmp[1] = 5; return in * tmp; } tmp gets placed in memory before any optimizers can even run.