Hello, this patch lets us fold a bit_field_ref of a constructor even when the elements are vectors. Writing a testcase is not that convenient because of the lack of a dead code elimination pass after forwprop4 (RTL doesn't always remove everything either), but I see a clear difference on this test on x86_64 without AVX. typedef double vec __attribute__((vector_size(4*sizeof(double)))); void f(vec*x){ *x+=*x+*x; } double g(vec*x){ return (*x+*x)[3]; } void h(vec*x, double a, double b, double c, double d){ vec y={a,b,c,d}; *x+=y; } I don't know if the patch (assuming it is ok) is suitable for stage 3, it may have to wait. It passes bootstrap+testsuite. I am still not quite sure why we even have a valid_gimple_rhs_p function (after which we usually give up if it says no) instead of gimplifying, so I may have missed a reason why CONSTRUCTOR or BIT_FIELD_REF shouldn't be ok. 2012-11-12 Marc Glisse * fold-const.c (fold_ternary_loc) [BIT_FIELD_REF]: Handle CONSTRUCTOR with vector elements. * tree-ssa-propagate.c (valid_gimple_rhs_p): Handle CONSTRUCTOR and BIT_FIELD_REF. -- Marc Glisse