http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53645
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-06-12 Ever Confirmed|0 |1 --- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-12 13:34:21 UTC --- The issue is that no packed integer division exists and that we lower the vector division to scalar code: <bb 2>: D.2165_4 = BIT_FIELD_REF <x_1(D), 32, 0>; D.2166_5 = D.2165_4 / 3; D.2167_6 = BIT_FIELD_REF <x_1(D), 32, 32>; D.2168_7 = D.2167_6 / 3; D.2169_8 = BIT_FIELD_REF <x_1(D), 32, 64>; D.2170_9 = D.2169_8 / 3; D.2171_10 = BIT_FIELD_REF <x_1(D), 32, 96>; D.2172_11 = D.2171_10 / 3; D.2159_2 = {D.2166_5, D.2168_7, D.2170_9, D.2172_11}; this lowering should instead try to do the multiplication trick. Compilable testcase: typedef int v4si __attribute__((vector_size(16))); v4si ttt(v4si x) { return x / (v4si) {3,3,3,3}; }