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]

Re: optimization/8896: '-mcpu=xscale -fno-strict-aliasing -O2' generates wrong code


On Thu, Dec 12, 2002 at 03:14:52PM +0000, Richard Earnshaw wrote:
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8896
> 
> I've attached what I believe to be the fix to the above PR.  It would be 
> helpful if you could give it a whirl.

I've added an updated testcase (produced after much labor by Russell
King) which shows the problem in 3.2.3.  The testcase is extremely
delicate.  It doesn't show the problem in 3.3 or HEAD, but I wouldn't
be at all surprised if the problem was still there.  Making a
testcase to show it is beyond me though.

For the curious, here's a diff of the first differing dump with and
without Richard's patch, using the 3.2 CVS branch.  It fails using
only "-march=armv4 -O2".

--- 32.s.22.postreload	2003-05-15 14:29:58.000000000 -0400
+++ 32p.s.22.postreload	2003-05-15 14:29:59.000000000 -0400
@@ -155,18 +155,25 @@
 (note 79 843 95 NOTE_INSN_DELETED)
 
 (insn 95 79 107 (set (reg/v:SI 11 fp [47])
-        (const_int 2 [0x2])) 175 {*arm_movsi_insn} (insn_list:REG_DEP_ANTI 79 (nil))
-    (nil))
+        (const_int 1 [0x1])) 175 {*arm_movsi_insn} (insn_list:REG_DEP_ANTI 79 (nil))
+    (expr_list:REG_EQUAL (const_int 1 [0x1])
+        (nil)))
+
+(note 107 95 117 NOTE_INSN_DELETED)
 
-(note 107 95 129 NOTE_INSN_DELETED)
+(insn 117 107 129 (set (reg/v:SI 11 fp [47])
+        (plus:SI (reg/v:SI 11 fp [47])
+            (reg/f:SI 11 fp))) 4 {*arm_addsi3} (insn_list:REG_DEP_ANTI 107 (insn_list 95 (nil)))
+    (expr_list:REG_EQUAL (const_int 2 [0x2])
+        (nil)))
 
-(note 129 107 135 NOTE_INSN_DELETED)
+(note 129 117 135 NOTE_INSN_DELETED)
 
 (note 135 129 137 NOTE_INSN_DELETED)
 
 (insn 137 135 141 (set (reg/v:SI 11 fp [47])
         (plus:SI (reg/v:SI 11 fp [47])
-            (reg/f:SI 11 fp))) 4 {*arm_addsi3} (insn_list:REG_DEP_ANTI 129 (insn_list 117 (nil)))
+            (const_int 1 [0x1]))) 4 {*arm_addsi3} (insn_list:REG_DEP_ANTI 129 (insn_list 117 (nil)))
     (expr_list:REG_EQUAL (const_int 3 [0x3])
         (nil)))
 
@@ -177,7 +184,7 @@
 
 (insn 197 141 221 (set (reg/v:SI 11 fp [47])
         (plus:SI (reg/v:SI 11 fp [47])
-            (const_int 2 [0x2]))) 4 {*arm_addsi3} (insn_list:REG_DEP_ANTI 141 (insn_list:REG_DEP_OUTPUT 137 (insn_list 135 (nil))))
+            (const_int 3 [0x3]))) 4 {*arm_addsi3} (insn_list:REG_DEP_ANTI 141 (insn_list:REG_DEP_OUTPUT 137 (insn_list 135 (nil))))
     (expr_list:REG_EQUAL (const_int 6 [0x6])
         (nil)))
 


-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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