http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58845
--- Comment #14 from Marc Glisse <glisse at gcc dot gnu.org> --- Created attachment 31343 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31343&action=edit WIP Let me attach this here. save_expr+build_vector_from_val is unnecessary, the BIT_*_EXPR case would handle it. scalar&&vector is short-circuit (not vector&&any), that's easy to change but it makes sense to me to have it short-circuit since it is possible. This is all untested and more stage1 material anyway. And we will still need quite a few simple optimizations on vectors to get sensible code out of it (things like (a<b)!=0 for instance).