summaryrefslogtreecommitdiffstats
path: root/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106860.patch
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106860.patch')
-rw-r--r--toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106860.patch104
1 files changed, 0 insertions, 104 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106860.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106860.patch
deleted file mode 100644
index 895d6a6cf..000000000
--- a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106860.patch
+++ /dev/null
@@ -1,104 +0,0 @@
12012-01-12 Ulrich Weigand <ulrich.weigand@linaro.org>
2
3 LP 879725
4 Backport from mainline:
5
6 2012-01-02 Revital Eres <revital.eres@linaro.org>
7
8 gcc/
9 * ddg.c (def_has_ccmode_p): New function.
10 (add_cross_iteration_register_deps,
11 create_ddg_dep_from_intra_loop_link): Call it.
12
13 gcc/testsuite/
14 * gcc.dg/sms-11.c: New file.
15
16=== modified file 'gcc/ddg.c'
17--- old/gcc/ddg.c 2011-10-02 06:56:53 +0000
18+++ new/gcc/ddg.c 2012-01-10 16:05:14 +0000
19@@ -166,6 +166,24 @@
20 return false;
21 }
22
23+/* Return true if one of the definitions in INSN has MODE_CC. Otherwise
24+ return false. */
25+static bool
26+def_has_ccmode_p (rtx insn)
27+{
28+ df_ref *def;
29+
30+ for (def = DF_INSN_DEFS (insn); *def; def++)
31+ {
32+ enum machine_mode mode = GET_MODE (DF_REF_REG (*def));
33+
34+ if (GET_MODE_CLASS (mode) == MODE_CC)
35+ return true;
36+ }
37+
38+ return false;
39+}
40+
41 /* Computes the dependence parameters (latency, distance etc.), creates
42 a ddg_edge and adds it to the given DDG. */
43 static void
44@@ -202,6 +220,7 @@
45 whose register has multiple defs in the loop. */
46 if (flag_modulo_sched_allow_regmoves
47 && (t == ANTI_DEP && dt == REG_DEP)
48+ && !def_has_ccmode_p (dest_node->insn)
49 && !autoinc_var_is_used_p (dest_node->insn, src_node->insn))
50 {
51 rtx set;
52@@ -335,7 +354,8 @@
53 if (DF_REF_ID (last_def) != DF_REF_ID (first_def)
54 || !flag_modulo_sched_allow_regmoves
55 || JUMP_P (use_node->insn)
56- || autoinc_var_is_used_p (DF_REF_INSN (last_def), use_insn))
57+ || autoinc_var_is_used_p (DF_REF_INSN (last_def), use_insn)
58+ || def_has_ccmode_p (DF_REF_INSN (last_def)))
59 create_ddg_dep_no_link (g, use_node, first_def_node, ANTI_DEP,
60 REG_DEP, 1);
61
62
63=== added file 'gcc/testsuite/gcc.dg/sms-11.c'
64--- old/gcc/testsuite/gcc.dg/sms-11.c 1970-01-01 00:00:00 +0000
65+++ new/gcc/testsuite/gcc.dg/sms-11.c 2012-01-10 16:05:14 +0000
66@@ -0,0 +1,37 @@
67+/* { dg-do run } */
68+/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */
69+
70+extern void abort (void);
71+
72+float out[4][4] = { 6, 6, 7, 5, 6, 7, 5, 5, 6, 4, 4, 4, 6, 2, 3, 4 };
73+
74+void
75+invert (void)
76+{
77+ int i, j, k = 0, swap;
78+ float tmp[4][4] = { 5, 6, 7, 5, 6, 7, 5, 5, 4, 4, 4, 4, 3, 2, 3, 4 };
79+
80+ for (i = 0; i < 4; i++)
81+ {
82+ for (j = i + 1; j < 4; j++)
83+ if (tmp[j][i] > tmp[i][i])
84+ swap = j;
85+
86+ if (swap != i)
87+ tmp[i][k] = tmp[swap][k];
88+ }
89+
90+ for (i = 0; i < 4; i++)
91+ for (j = 0; j < 4; j++)
92+ if (tmp[i][j] != out[i][j])
93+ abort ();
94+}
95+
96+int
97+main ()
98+{
99+ invert ();
100+ return 0;
101+}
102+
103+/* { dg-final { cleanup-rtl-dump "sms" } } */
104