This is the mail archive of the gcc-patches@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]

Re: New optimization for reload_combine


On 07/17/2010 04:38 AM, H.J. Lu wrote:
> This caused:
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44970

Apparently, the sse_prologue_save_insn is broken.

diff -dru old/nest-stdar-1.s new/nest-stdar-1.s
--- old/nest-stdar-1.s	2010-07-17 14:10:40.308605357 +0000
+++ new/nest-stdar-1.s	2010-07-17 14:00:30.592312121 +0000
@@ -9,25 +9,24 @@
 	subq	$48, %rsp
 	.cfi_def_cfa_offset 56
 	leaq	0(,%rax,4), %rcx
-	leaq	39(%rsp), %rdx
 	movl	$.L2, %eax
 	subq	%rcx, %rax
 	jmp	*%rax
-	movaps	%xmm7, -15(%rdx)
-	movaps	%xmm6, -31(%rdx)
-	movaps	%xmm5, -47(%rdx)
-	movaps	%xmm4, -63(%rdx)
-	movaps	%xmm3, -79(%rdx)
-	movaps	%xmm2, -95(%rdx)
-	movaps	%xmm1, -111(%rdx)
-	movaps	%xmm0, -127(%rdx)
+	movaps	%xmm7, 24(%rsp)
+	movaps	%xmm6, 8(%rsp)
+	movaps	%xmm5, -8(%rsp)
+	movaps	%xmm4, -24(%rsp)
+	movaps	%xmm3, -40(%rsp)
+	movaps	%xmm2, -56(%rsp)
+	movaps	%xmm1, -72(%rsp)
+	movaps	%xmm0, -88(%rsp)

It's implementing a crazy jump table, which requires that all insns have
the same length, which in turn requires that no one modifies the address
in the pattern.

I can fix this testcase with the patch below, but I'll leave it for the
x86 maintainers to choose this fix or another.


Bernd

Attachment: crazy.diff
Description: Text document


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