This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/24073] (vector float){a, b, 0, 0} code gen is not good


------- Additional Comments From uros at kss-loka dot si  2005-09-27 11:19 -------
With a couple of months old mainline gcc (20050716), following asm is produced:
(-O2 -msse2 -fomit-frame-pointer):

	subl	$12, %esp
	movss	b, %xmm0
	movss	a, %xmm1
	unpcklps	%xmm0, %xmm1
	movaps	%xmm1, %xmm0
	xorl	%eax, %eax
	xorl	%edx, %edx
	movl	%eax, (%esp)
	movl	%edx, 4(%esp)
>>>	movlps	(%esp), %xmm1
	addl	$12, %esp
	movlhps	%xmm1, %xmm0
	ret

This explains where all those xor and moves come from. It looks that newer 
compilers somehow fix the damage by using xorps, a bit late in the game, IMO.

This part of bug depends on PR target/22076.

Other than that, the problem is that V4SF vector initialization is decomposed 
to two V2SF initializations (these are MMX insns and this further confuses 
x87/MMX switching patch) that are later concated to V4SF.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |22076


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24073


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]