This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: reloading sums
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, geoffk at geoffk dot org, dje at watson dot ibm dot com, aldyh at redhat dot com
- Date: Fri, 20 Jun 2003 12:08:03 +0100
- Subject: Re: RFC: reloading sums
- Organization: SuperH UK Ltd.
- References: <3EF20566.E6A5B8F2@superh.com> <3EF232BC.29E163A@superh.com>
Joern Rennecke wrote:
>
> To make the problem better observable, I've created a synthetic
> testcase; ironically, it doesn't trigger for sh5-compact, where
> the problem was originally observed, but it does on sh5-media32,
> and my patch also cures the problem there.
> However, when I try the testcase on powerpc-eabi, it fails at -O2,
> with or without my patch. It even fails when I change can_reload_into
> to return always 0.
> Unfortunalely, it's getting late here, and I don't have a powerpc-eabi
> debugger at hand. Maybe one of you can find out what's going on here?
Well, it build overnight. I've attached an untested patch that shows where
the problem was.
can_reload_into was actually called only with MEMs like this one for this
testcase on powerpc-eabi -O2:
Breakpoint 4, can_reload_into (in=0x4029e5b4, regno=19, mode=SImode)
at ../../srcw/gcc/reload.c:857
857 int r = 0;
1: debug_rtx (in) = (mem:SI (plus:SI (reg/f:SI 1 r1)
(reg:SI 19 r19 [572])) [3 a37+0 S4 A128])
--
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658
Index: config/rs6000/rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.259
diff -p -u -r1.259 rs6000.md
--- config/rs6000/rs6000.md 9 Jun 2003 17:16:14 -0000 1.259
+++ config/rs6000/rs6000.md 20 Jun 2003 11:01:57 -0000
@@ -13989,15 +13989,15 @@
(define_insn "*ctrsi_internal1"
[(set (pc)
- (if_then_else (ne (match_operand:SI 1 "register_operand" "c,*r,*r")
+ (if_then_else (ne (match_operand:SI 1 "register_operand" "c,*r,*r,*r")
(const_int 1))
(label_ref (match_operand 0 "" ""))
(pc)))
- (set (match_operand:SI 2 "register_operand" "=1,*r,m*q*c*l")
+ (set (match_operand:SI 2 "register_operand" "=1,*r,m,*q*c*l")
(plus:SI (match_dup 1)
(const_int -1)))
- (clobber (match_scratch:CC 3 "=X,&x,&x"))
- (clobber (match_scratch:SI 4 "=X,X,r"))]
+ (clobber (match_scratch:CC 3 "=X,&x,&x,&x"))
+ (clobber (match_scratch:SI 4 "=X,X,&r,r"))]
"! TARGET_POWERPC64"
"*
{
@@ -14009,7 +14009,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "4,12,16")])
+ (set_attr "length" "4,12,16,16")])
(define_insn "*ctrsi_internal2"
[(set (pc)