SOURCES (GCC_4_1): gcc-pr25248.patch (NEW) - fix -m64 on i686/ppc.
pluto
pluto at pld-linux.org
Wed Dec 7 00:51:12 CET 2005
Author: pluto Date: Tue Dec 6 23:51:12 2005 GMT
Module: SOURCES Tag: GCC_4_1
---- Log message:
- fix -m64 on i686/ppc.
---- Files affected:
SOURCES:
gcc-pr25248.patch (NONE -> 1.1.2.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/gcc-pr25248.patch
diff -u /dev/null SOURCES/gcc-pr25248.patch:1.1.2.1
--- /dev/null Wed Dec 7 00:51:12 2005
+++ SOURCES/gcc-pr25248.patch Wed Dec 7 00:51:07 2005
@@ -0,0 +1,67 @@
+Date: Tue, 6 Dec 2005 21:31:58 +0100
+From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
+Subject: [patch] for PR 25248
+
+Hello,
+
+when follow_ssa_edge_in_rhs analyzes expression of form a + b, it first
+tries to analyze a, and if it fails, analyzes b. The results are
+accumulated to evolution_of_loop. However, the failed attempt to analyze 'a' may
+modify contents of evolution_of_loop; the result of analysis of 'b' is
+then combined with it, which produces a wrong result. Fixed by using a
+temporary variable to store the result in the analysis of 'a'.
+
+Bootstrapped & regtested on i686 and ppc64.
+
+Zdenek
+
+ PR tree-optimization/25248
+ * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Do not use
+ evolution_of_loop from the failed attempt.
+
+Index: tree-scalar-evolution.c
+===================================================================
+*** gcc/gcc/tree-scalar-evolution.c (revision 108078)
+--- gcc/gcc/tree-scalar-evolution.c (working copy)
+*************** follow_ssa_edge_in_rhs (struct loop *loo
+*** 1042,1047 ****
+--- 1042,1048 ----
+ t_bool res = t_false;
+ tree rhs0, rhs1;
+ tree type_rhs = TREE_TYPE (rhs);
++ tree evol;
+
+ /* The RHS is one of the following cases:
+ - an SSA_NAME,
+*************** follow_ssa_edge_in_rhs (struct loop *loo
+*** 1084,1097 ****
+ {
+ /* Match an assignment under the form:
+ "a = b + c". */
+ res = follow_ssa_edge
+ (loop, SSA_NAME_DEF_STMT (rhs0), halting_phi,
+! evolution_of_loop, limit);
+
+ if (res == t_true)
+ *evolution_of_loop = add_to_evolution
+ (loop->num,
+! chrec_convert (type_rhs, *evolution_of_loop, at_stmt),
+ PLUS_EXPR, rhs1);
+
+ else if (res == t_false)
+--- 1085,1099 ----
+ {
+ /* Match an assignment under the form:
+ "a = b + c". */
++ evol = *evolution_of_loop;
+ res = follow_ssa_edge
+ (loop, SSA_NAME_DEF_STMT (rhs0), halting_phi,
+! &evol, limit);
+
+ if (res == t_true)
+ *evolution_of_loop = add_to_evolution
+ (loop->num,
+! chrec_convert (type_rhs, evol, at_stmt),
+ PLUS_EXPR, rhs1);
+
+ else if (res == t_false)
================================================================
More information about the pld-cvs-commit
mailing list