diff options
author | Khem Raj <raj.khem@gmail.com> | 2012-01-09 23:44:15 +0000 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-01-10 21:43:57 +0100 |
commit | f2179dabaaba99ef5b9fe48e38c73b2178d50390 (patch) | |
tree | 75794237780670c3eaced84192d8badfad5161c2 /meta-oe/recipes-devtools | |
parent | d3a451bbd08f7bb0ddea1aa0b314a72d65c660d4 (diff) | |
download | meta-openembedded-f2179dabaaba99ef5b9fe48e38c73b2178d50390.tar.gz |
gcc-4.6: Fix ICE on x86_64 seen during vectorization
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r-- | meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch | 66 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/gcc/gcc-common-4.6.inc | 2 |
2 files changed, 49 insertions, 19 deletions
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch b/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch index ff34514ff..3a149231f 100644 --- a/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch +++ b/meta-oe/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106769.patch | |||
@@ -53,7 +53,7 @@ | |||
53 | Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c | 53 | Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c |
54 | =================================================================== | 54 | =================================================================== |
55 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 55 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 |
56 | +++ gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c 2011-09-16 20:32:57.279056697 -0700 | 56 | +++ gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c 2012-01-09 15:03:29.156918805 -0800 |
57 | @@ -0,0 +1,52 @@ | 57 | @@ -0,0 +1,52 @@ |
58 | +/* { dg-require-effective-target vect_int } */ | 58 | +/* { dg-require-effective-target vect_int } */ |
59 | + | 59 | + |
@@ -110,7 +110,7 @@ Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c | |||
110 | Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c | 110 | Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c |
111 | =================================================================== | 111 | =================================================================== |
112 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 112 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 |
113 | +++ gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c 2011-09-16 20:32:57.279056697 -0700 | 113 | +++ gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c 2012-01-09 15:03:29.156918805 -0800 |
114 | @@ -0,0 +1,59 @@ | 114 | @@ -0,0 +1,59 @@ |
115 | +/* { dg-require-effective-target vect_int } */ | 115 | +/* { dg-require-effective-target vect_int } */ |
116 | + | 116 | + |
@@ -174,7 +174,7 @@ Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c | |||
174 | Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c | 174 | Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c |
175 | =================================================================== | 175 | =================================================================== |
176 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 176 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 |
177 | +++ gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c 2011-09-16 20:32:57.279056697 -0700 | 177 | +++ gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c 2012-01-09 15:03:29.160918806 -0800 |
178 | @@ -0,0 +1,49 @@ | 178 | @@ -0,0 +1,49 @@ |
179 | +/* { dg-require-effective-target vect_int } */ | 179 | +/* { dg-require-effective-target vect_int } */ |
180 | + | 180 | + |
@@ -227,8 +227,8 @@ Index: gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c | |||
227 | + | 227 | + |
228 | Index: gcc-4_6-branch/gcc/tree-vect-loop.c | 228 | Index: gcc-4_6-branch/gcc/tree-vect-loop.c |
229 | =================================================================== | 229 | =================================================================== |
230 | --- gcc-4_6-branch.orig/gcc/tree-vect-loop.c 2011-09-16 20:31:52.000000000 -0700 | 230 | --- gcc-4_6-branch.orig/gcc/tree-vect-loop.c 2012-01-09 15:02:15.000000000 -0800 |
231 | +++ gcc-4_6-branch/gcc/tree-vect-loop.c 2011-09-16 20:32:57.289056641 -0700 | 231 | +++ gcc-4_6-branch/gcc/tree-vect-loop.c 2012-01-09 15:03:29.160918806 -0800 |
232 | @@ -181,6 +181,8 @@ | 232 | @@ -181,6 +181,8 @@ |
233 | stmt_vec_info stmt_info; | 233 | stmt_vec_info stmt_info; |
234 | int i; | 234 | int i; |
@@ -379,8 +379,8 @@ Index: gcc-4_6-branch/gcc/tree-vect-loop.c | |||
379 | 379 | ||
380 | Index: gcc-4_6-branch/gcc/tree-vect-patterns.c | 380 | Index: gcc-4_6-branch/gcc/tree-vect-patterns.c |
381 | =================================================================== | 381 | =================================================================== |
382 | --- gcc-4_6-branch.orig/gcc/tree-vect-patterns.c 2011-09-16 20:31:52.000000000 -0700 | 382 | --- gcc-4_6-branch.orig/gcc/tree-vect-patterns.c 2012-01-09 15:02:15.000000000 -0800 |
383 | +++ gcc-4_6-branch/gcc/tree-vect-patterns.c 2011-09-16 20:32:57.289056641 -0700 | 383 | +++ gcc-4_6-branch/gcc/tree-vect-patterns.c 2012-01-09 15:03:29.160918806 -0800 |
384 | @@ -39,10 +39,13 @@ | 384 | @@ -39,10 +39,13 @@ |
385 | #include "diagnostic-core.h" | 385 | #include "diagnostic-core.h" |
386 | 386 | ||
@@ -930,8 +930,8 @@ Index: gcc-4_6-branch/gcc/tree-vect-patterns.c | |||
930 | fprintf (vect_dump, "=== vect_pattern_recog ==="); | 930 | fprintf (vect_dump, "=== vect_pattern_recog ==="); |
931 | Index: gcc-4_6-branch/gcc/tree-vect-slp.c | 931 | Index: gcc-4_6-branch/gcc/tree-vect-slp.c |
932 | =================================================================== | 932 | =================================================================== |
933 | --- gcc-4_6-branch.orig/gcc/tree-vect-slp.c 2011-09-16 20:31:52.000000000 -0700 | 933 | --- gcc-4_6-branch.orig/gcc/tree-vect-slp.c 2012-01-09 15:02:15.000000000 -0800 |
934 | +++ gcc-4_6-branch/gcc/tree-vect-slp.c 2011-09-16 20:32:57.289056641 -0700 | 934 | +++ gcc-4_6-branch/gcc/tree-vect-slp.c 2012-01-09 15:03:29.160918806 -0800 |
935 | @@ -152,7 +152,9 @@ | 935 | @@ -152,7 +152,9 @@ |
936 | if (loop && def_stmt && gimple_bb (def_stmt) | 936 | if (loop && def_stmt && gimple_bb (def_stmt) |
937 | && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt)) | 937 | && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt)) |
@@ -945,8 +945,8 @@ Index: gcc-4_6-branch/gcc/tree-vect-slp.c | |||
945 | *pattern0 = true; | 945 | *pattern0 = true; |
946 | Index: gcc-4_6-branch/gcc/tree-vect-stmts.c | 946 | Index: gcc-4_6-branch/gcc/tree-vect-stmts.c |
947 | =================================================================== | 947 | =================================================================== |
948 | --- gcc-4_6-branch.orig/gcc/tree-vect-stmts.c 2011-09-16 20:31:52.000000000 -0700 | 948 | --- gcc-4_6-branch.orig/gcc/tree-vect-stmts.c 2012-01-09 15:02:15.000000000 -0800 |
949 | +++ gcc-4_6-branch/gcc/tree-vect-stmts.c 2011-09-16 20:32:57.289056641 -0700 | 949 | +++ gcc-4_6-branch/gcc/tree-vect-stmts.c 2012-01-09 15:06:23.636927250 -0800 |
950 | @@ -126,33 +126,72 @@ | 950 | @@ -126,33 +126,72 @@ |
951 | 951 | ||
952 | static void | 952 | static void |
@@ -1007,6 +1007,8 @@ Index: gcc-4_6-branch/gcc/tree-vect-stmts.c | |||
1007 | + pattern that can potentially be vectorized. Don't mark the stmt | 1007 | + pattern that can potentially be vectorized. Don't mark the stmt |
1008 | + as relevant/live because it's not going to be vectorized. | 1008 | + as relevant/live because it's not going to be vectorized. |
1009 | + Instead mark the pattern-stmt that replaces it. */ | 1009 | + Instead mark the pattern-stmt that replaces it. */ |
1010 | + | ||
1011 | + pattern_stmt = STMT_VINFO_RELATED_STMT (stmt_info); | ||
1010 | 1012 | ||
1011 | - /* This is the last stmt in a sequence that was detected as a | 1013 | - /* This is the last stmt in a sequence that was detected as a |
1012 | - pattern that can potentially be vectorized. Don't mark the stmt | 1014 | - pattern that can potentially be vectorized. Don't mark the stmt |
@@ -1022,8 +1024,6 @@ Index: gcc-4_6-branch/gcc/tree-vect-stmts.c | |||
1022 | - save_relevant = STMT_VINFO_RELEVANT (stmt_info); | 1024 | - save_relevant = STMT_VINFO_RELEVANT (stmt_info); |
1023 | - save_live_p = STMT_VINFO_LIVE_P (stmt_info); | 1025 | - save_live_p = STMT_VINFO_LIVE_P (stmt_info); |
1024 | - stmt = pattern_stmt; | 1026 | - stmt = pattern_stmt; |
1025 | + pattern_stmt = STMT_VINFO_RELATED_STMT (stmt_info); | ||
1026 | + | ||
1027 | + if (vect_print_dump_info (REPORT_DETAILS)) | 1027 | + if (vect_print_dump_info (REPORT_DETAILS)) |
1028 | + fprintf (vect_dump, "last stmt in pattern. don't mark" | 1028 | + fprintf (vect_dump, "last stmt in pattern. don't mark" |
1029 | + " relevant/live."); | 1029 | + " relevant/live."); |
@@ -1181,11 +1181,11 @@ Index: gcc-4_6-branch/gcc/tree-vect-stmts.c | |||
1181 | In basic blocks we only analyze statements that are a part of some SLP | 1181 | In basic blocks we only analyze statements that are a part of some SLP |
1182 | - instance, therefore, all the statements are relevant. */ | 1182 | - instance, therefore, all the statements are relevant. */ |
1183 | + instance, therefore, all the statements are relevant. | 1183 | + instance, therefore, all the statements are relevant. |
1184 | 1184 | + | |
1185 | + Pattern statement need to be analyzed instead of the original statement | 1185 | + Pattern statement need to be analyzed instead of the original statement |
1186 | + if the original statement is not relevant. Otherwise, we analyze both | 1186 | + if the original statement is not relevant. Otherwise, we analyze both |
1187 | + statements. */ | 1187 | + statements. */ |
1188 | + | 1188 | |
1189 | + pattern_stmt = STMT_VINFO_RELATED_STMT (stmt_info); | 1189 | + pattern_stmt = STMT_VINFO_RELATED_STMT (stmt_info); |
1190 | if (!STMT_VINFO_RELEVANT_P (stmt_info) | 1190 | if (!STMT_VINFO_RELEVANT_P (stmt_info) |
1191 | && !STMT_VINFO_LIVE_P (stmt_info)) | 1191 | && !STMT_VINFO_LIVE_P (stmt_info)) |
@@ -1222,7 +1222,37 @@ Index: gcc-4_6-branch/gcc/tree-vect-stmts.c | |||
1222 | 1222 | ||
1223 | switch (STMT_VINFO_DEF_TYPE (stmt_info)) | 1223 | switch (STMT_VINFO_DEF_TYPE (stmt_info)) |
1224 | { | 1224 | { |
1225 | @@ -5605,8 +5687,12 @@ | 1225 | @@ -5074,7 +5156,6 @@ |
1226 | bool is_store = false; | ||
1227 | gimple vec_stmt = NULL; | ||
1228 | stmt_vec_info stmt_info = vinfo_for_stmt (stmt); | ||
1229 | - gimple orig_stmt_in_pattern; | ||
1230 | bool done; | ||
1231 | |||
1232 | switch (STMT_VINFO_TYPE (stmt_info)) | ||
1233 | @@ -5213,21 +5294,7 @@ | ||
1234 | } | ||
1235 | |||
1236 | if (vec_stmt) | ||
1237 | - { | ||
1238 | STMT_VINFO_VEC_STMT (stmt_info) = vec_stmt; | ||
1239 | - orig_stmt_in_pattern = STMT_VINFO_RELATED_STMT (stmt_info); | ||
1240 | - if (orig_stmt_in_pattern) | ||
1241 | - { | ||
1242 | - stmt_vec_info stmt_vinfo = vinfo_for_stmt (orig_stmt_in_pattern); | ||
1243 | - /* STMT was inserted by the vectorizer to replace a computation idiom. | ||
1244 | - ORIG_STMT_IN_PATTERN is a stmt in the original sequence that | ||
1245 | - computed this idiom. We need to record a pointer to VEC_STMT in | ||
1246 | - the stmt_info of ORIG_STMT_IN_PATTERN. See more details in the | ||
1247 | - documentation of vect_pattern_recog. */ | ||
1248 | - if (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)) | ||
1249 | - STMT_VINFO_VEC_STMT (stmt_vinfo) = vec_stmt; | ||
1250 | - } | ||
1251 | - } | ||
1252 | |||
1253 | return is_store; | ||
1254 | } | ||
1255 | @@ -5605,8 +5672,12 @@ | ||
1226 | || *dt == vect_nested_cycle) | 1256 | || *dt == vect_nested_cycle) |
1227 | { | 1257 | { |
1228 | stmt_vec_info stmt_info = vinfo_for_stmt (*def_stmt); | 1258 | stmt_vec_info stmt_info = vinfo_for_stmt (*def_stmt); |
@@ -1238,8 +1268,8 @@ Index: gcc-4_6-branch/gcc/tree-vect-stmts.c | |||
1238 | } | 1268 | } |
1239 | Index: gcc-4_6-branch/gcc/tree-vectorizer.h | 1269 | Index: gcc-4_6-branch/gcc/tree-vectorizer.h |
1240 | =================================================================== | 1270 | =================================================================== |
1241 | --- gcc-4_6-branch.orig/gcc/tree-vectorizer.h 2011-09-16 20:31:52.000000000 -0700 | 1271 | --- gcc-4_6-branch.orig/gcc/tree-vectorizer.h 2012-01-09 15:02:15.000000000 -0800 |
1242 | +++ gcc-4_6-branch/gcc/tree-vectorizer.h 2011-09-16 20:32:57.299056515 -0700 | 1272 | +++ gcc-4_6-branch/gcc/tree-vectorizer.h 2012-01-09 15:03:29.164918806 -0800 |
1243 | @@ -890,7 +890,7 @@ | 1273 | @@ -890,7 +890,7 @@ |
1244 | /* Pattern recognition functions. | 1274 | /* Pattern recognition functions. |
1245 | Additional pattern recognition functions can (and will) be added | 1275 | Additional pattern recognition functions can (and will) be added |
diff --git a/meta-oe/recipes-devtools/gcc/gcc-common-4.6.inc b/meta-oe/recipes-devtools/gcc/gcc-common-4.6.inc index c12913d92..6b0151b5b 100644 --- a/meta-oe/recipes-devtools/gcc/gcc-common-4.6.inc +++ b/meta-oe/recipes-devtools/gcc/gcc-common-4.6.inc | |||
@@ -1,4 +1,4 @@ | |||
1 | # this will prepend this layer to FILESPATH | 1 | # this will prepend this layer to FILESPATH |
2 | FILESEXTRAPATHS := "${THISDIR}/gcc-4.6" | 2 | FILESEXTRAPATHS := "${THISDIR}/gcc-4.6" |
3 | PRINC = "3" | 3 | PRINC = "4" |
4 | ARM_INSTRUCTION_SET = "arm" | 4 | ARM_INSTRUCTION_SET = "arm" |