http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46716
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW CC| |hjl at gcc dot gnu.org, | |hubicka at gcc dot gnu.org AssignedTo|jakub at gcc dot gnu.org |unassigned at gcc dot | |gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-30 12:35:56 UTC --- Well, apparently -mno-sse2 doesn't disable completely SSE2 use, vectors are still passed in %xmm* registers for -m64. See i386.c (type_natural_mode). The problem is that then we have a parameter, where data->nominal_mode (and passed_mode and promoted_mode) is BLKmode, but data->entry_parm is (reg:V2DF 21 xmm0 [ s1 ]). assign_parm_setup_block_p because of the BLKmode nominal_mode returns true and assign_parm_setup_block copies it in wordsize (DImode here) parts, incrementing REGNO for each part. So, we end up passing first half of first parameter in %xmm0, second half in %xmm1, first half of second parameter in %xmm1 and second half of second parameter in %xmm2 (both on the caller and callee side). I guess generic vector support in 3.4 was even more broken and it just didn't care and used V2DFmode for the type even with -mno-sse2. And of course using -mno-sse2 in x86-64 on code that uses vectors makes no sense at all. Anyway, not sure how to convince the middle-end to handle this "right" for whatever definition of right, without risking breaking other targets too much.