http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54716
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-26 14:23:29 UTC --- (In reply to comment #2) > (In reply to comment #1) > > Created attachment 28282 [details] > > gcc48-pr54716.patch > > Does this patch also fix xfail in gcc.target/i386/xorps-sse2.c? > > IIRC, we generated correct instructions for float arguments, but deliberatly > removed this functionality for some reason. I tried to look for the reason in > the SVN history, but didn't found anything relevant. It doesn't, the optimization is keyed there on the casts from vector float on both operands, not on the cast of results. And on that testcase one of the arguments is not a SUBREG from the floating vector. I think doing the optimization is questionable if both operands aren't float vectors, because then we could very well pessimize the generated code instead of improving it. If both are float vectors, then most likely we'll get rid of two reinterpretation penalties and perhaps worst case add one on the result. To fix up xorps-sse2.c, we could tweak the expander's predicates, from nonimmediate_operand to say "", and we could handle CONST_VECTOR as any kind of load for the purpose of the test, then of course force to register if not nonimmediate_operand.