~ubuntu-branches/debian/sid/gcc-4.8/sid

« back to all changes in this revision

Viewing changes to .svn/pristine/a2/a21d29683ad460d999dd86713c449b3ca29508f0.svn-base

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-12-19 19:48:34 UTC
  • Revision ID: package-import@ubuntu.com-20141219194834-4dz1q7rrn5pad823
Tags: 4.8.4-1
* GCC 4.8.4 release.
  - Fix PR target/61407 (darwin), PR middle-end/58624 (ice),
    PR sanitizer/64265 (wrong code).
* Require recent binutils to pass go test failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# DP: Proposed fix for PR rtl-optimization/52714:
 
2
# DP: Revert gcc 4.8 to gcc the 4.5 version of the PR rtl-optimization/45695 fix:
 
3
 
 
4
--- a/src/gcc/combine.c
 
5
+++ b/src/gcc/combine.c
 
6
@@ -3690,41 +3690,42 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx
 
7
           && GET_CODE (XVECEXP (newpat, 0, 1)) == SET
 
8
           && GET_CODE (SET_DEST (XVECEXP (newpat, 0, 1))) != ZERO_EXTRACT
 
9
           && GET_CODE (SET_DEST (XVECEXP (newpat, 0, 1))) != STRICT_LOW_PART
 
10
+          && ! use_crosses_set_p (SET_SRC (XVECEXP (newpat, 0, 1)),
 
11
+                                  DF_INSN_LUID (i2))
 
12
           && ! reg_referenced_p (SET_DEST (XVECEXP (newpat, 0, 1)),
 
13
                                  XVECEXP (newpat, 0, 0))
 
14
           && ! reg_referenced_p (SET_DEST (XVECEXP (newpat, 0, 0)),
 
15
                                  XVECEXP (newpat, 0, 1))
 
16
           && ! (contains_muldiv (SET_SRC (XVECEXP (newpat, 0, 0)))
 
17
-                && contains_muldiv (SET_SRC (XVECEXP (newpat, 0, 1)))))
 
18
+                && contains_muldiv (SET_SRC (XVECEXP (newpat, 0, 1))))
 
19
+#ifdef HAVE_cc0
 
20
+          /* We cannot split the parallel into two sets if both sets
 
21
+             reference cc0.  */
 
22
+          && ! (reg_referenced_p (cc0_rtx, XVECEXP (newpat, 0, 0))
 
23
+                && reg_referenced_p (cc0_rtx, XVECEXP (newpat, 0, 1)))
 
24
+#endif
 
25
+          )
 
26
     {
 
27
       /* Normally, it doesn't matter which of the two is done first,
 
28
-        but the one that references cc0 can't be the second, and
 
29
-        one which uses any regs/memory set in between i2 and i3 can't
 
30
+        but it does if one references cc0.  In that case, it has to
 
31
         be first.  */
 
32
-      if (!use_crosses_set_p (SET_SRC (XVECEXP (newpat, 0, 1)),
 
33
-                             DF_INSN_LUID (i2))
 
34
-#ifdef HAVE_cc0
 
35
-         && !reg_referenced_p (cc0_rtx, XVECEXP (newpat, 0, 0))
 
36
-#endif
 
37
-        )
 
38
-       {
 
39
-         newi2pat = XVECEXP (newpat, 0, 1);
 
40
-         newpat = XVECEXP (newpat, 0, 0);
 
41
-       }
 
42
-      else if (!use_crosses_set_p (SET_SRC (XVECEXP (newpat, 0, 0)),
 
43
-                                  DF_INSN_LUID (i2))
 
44
 #ifdef HAVE_cc0
 
45
-              && !reg_referenced_p (cc0_rtx, XVECEXP (newpat, 0, 1))
 
46
-#endif
 
47
-             )
 
48
+      if (reg_referenced_p (cc0_rtx, XVECEXP (newpat, 0, 0)))
 
49
        {
 
50
+         if (use_crosses_set_p (SET_SRC (XVECEXP (newpat, 0, 0)),
 
51
+                                DF_INSN_LUID (i2)))
 
52
+           {
 
53
+             undo_all ();
 
54
+             return 0;
 
55
+           }
 
56
          newi2pat = XVECEXP (newpat, 0, 0);
 
57
          newpat = XVECEXP (newpat, 0, 1);
 
58
        }
 
59
       else
 
60
+#endif
 
61
        {
 
62
-         undo_all ();
 
63
-         return 0;
 
64
+         newi2pat = XVECEXP (newpat, 0, 1);
 
65
+         newpat = XVECEXP (newpat, 0, 0);
 
66
        }
 
67
 
 
68
       i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes);