> My current understanding of simplify-rtx is that we should only do "safe" > optimizations in it (make sure we only create expressions that every > target will recognize), and if I want more advanced optimizations, I > should do them elsewhere (not sure where). So I should probably at least > restrict this one to the case where the result and XEXP (trueop0, 0) have > the same mode.
Yes, simplify-rtx should only canonicalize or simplify expressions. Merging 2 VEC_SELECTs into a single one seems to fall into the second category, but if no target can take advantage of it, that's probably a bit questionable indeed. -- Eric Botcazou