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

alpha memcpy-1 failure

On Sat, Aug 15, 1998 at 11:00:49PM -0600, Jeffrey A Law wrote:
> The exact failure:
> FAIL: gcc.c-torture/execute/memcpy-1.c execution,  -O2 -fomit-frame-pointer \
> -finline-functions -funroll-all-loops 

Oh, man this one was ugly.  Somewhere after prologues were emitted, 
someone did some CSE, and managed to combine part of the stack probe
loop with a constant load:

        bis $31,32,$23		<===
        lda $22,4096($30)
        stq $31,-8192($22)
        subq $23,1,$23		<=== Oops, killed.
        lda $22,-8192($22)
        bne $23,$LSC0
        lda $30,-4128($22)
        stq $10,16($30)
        ldah $23,2($23)		<===

Of course, scheduling was such that it only showed up on EV4.

While the symptom is easy to fix once known (patch attached), I was
under the impression that unspec_volatile was assumed to clobber all
hard regs and all of memory.  If so, there's still a bug somewhere.


	* (prologue_stack_probe_loop): Record changed regs.

RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/alpha/,v
retrieving revision
diff -u -p -r1.46.2.1
---	1998/07/30 19:12:16
+++	1998/08/16 06:08:18
@@ -5075,8 +5075,10 @@
 ;; the loop in this one insn.
 (define_insn "prologue_stack_probe_loop"
-  [(unspec_volatile [(match_operand 0 "register_operand" "r")
-		     (match_operand 1 "register_operand" "r")] 5)]
+  [(set (match_operand:DI 0 "register_operand" "r")
+	(unspec_volatile:DI [(match_dup 0)
+		             (match_operand:DI 1 "register_operand" "r")] 5))
+   (set (match_dup 1) (const_int 0))]

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