On Fri, 26 Jun 2015, Richard Biener wrote: >>>> OK. The reason I was being paranoid was that I couldn't see anywhere >>>> where we enforced that the vector condition in a VEC_COND had to have >>>> the same element width as the values being selected. >>> >>> >>> We don't require that indeed. >>> >>>> tree-cfg.c >>>> only checks that rhs2 and rhs3 are compatible with the result. >>>> There doesn't seem to be any checking of rhs1 vs. the other types. >>>> So I wasn't sure whether anything stopped us from, e.g., comparing two >>>> V4HIs and using the result to select between two V4SIs. >>> >>> >>> Nothing does (or should). >> >> >> The documentation patch you approved in >> https://gcc.gnu.org/ml/gcc-patches/2012-10/msg01109.html says something >> different. If it is really wrong, could you fix it? > > Hmm, that simplifies things. On the other hand, vectors of bools could be (I haven't thought about it much) nice to have, especially for avx512 (and at least one other arch, maybe sparc). > It would be nice if these constraints would also be checked in the > gimple verifier... This passed bootstrap+testsuite on powerpc64le-unknown-linux-gnu. 2015-06-29 Marc Glisse * tree-cfg.c (verify_gimple_assign_ternary) : Check the first argument. -- Marc Glisse