diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-10-07 10:29:23 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-14 07:55:54 -0700 |
commit | 7e12df5bec2c1811217e5843f92bb466e43b787a (patch) | |
tree | 968f2b9b670cc5ee8ace19476a5a8df7f18a3cb2 | |
parent | 4cb2af5af804393c80ed4d76b2ff34187d5a4d5b (diff) | |
download | poky-7e12df5bec2c1811217e5843f92bb466e43b787a.tar.gz |
gcc-6.3: Backport patch to fix ICE on ARM
Fixes
internal compiler error: Max. number of generated reload insns per insn is achieved (90)
(From OE-Core rev: 7f5485d2b8f978964f1f932fd328c98d0a1872c0)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d2631f45a057c53797b7ba657662f35f66a2b04e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-6.3.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-6.3/0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch | 51 |
2 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-6.3.inc b/meta/recipes-devtools/gcc/gcc-6.3.inc index d74f12c466..0d98be3861 100644 --- a/meta/recipes-devtools/gcc/gcc-6.3.inc +++ b/meta/recipes-devtools/gcc/gcc-6.3.inc | |||
@@ -81,6 +81,7 @@ SRC_URI = "\ | |||
81 | file://0048-sync-gcc-stddef.h-with-musl.patch \ | 81 | file://0048-sync-gcc-stddef.h-with-musl.patch \ |
82 | file://0054_all_nopie-all-flags.patch \ | 82 | file://0054_all_nopie-all-flags.patch \ |
83 | file://0055-unwind_h-glibc26.patch \ | 83 | file://0055-unwind_h-glibc26.patch \ |
84 | file://0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch \ | ||
84 | ${BACKPORTS} \ | 85 | ${BACKPORTS} \ |
85 | " | 86 | " |
86 | BACKPORTS = "\ | 87 | BACKPORTS = "\ |
diff --git a/meta/recipes-devtools/gcc/gcc-6.3/0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch b/meta/recipes-devtools/gcc/gcc-6.3/0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch new file mode 100644 index 0000000000..231f147619 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-6.3/0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From a582b0a53d1dc8604a201348b99ca8de48784e7e Mon Sep 17 00:00:00 2001 | ||
2 | From: jiwang <jiwang@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Thu, 12 May 2016 17:00:52 +0000 | ||
4 | Subject: [PATCH] [LRA] PR70904, relax the restriction on subreg reload for | ||
5 | wide mode | ||
6 | |||
7 | 2016-05-12 Jiong Wang <jiong.wang@arm.com> | ||
8 | |||
9 | gcc/ | ||
10 | PR rtl-optimization/70904 | ||
11 | * lra-constraint.c (process_addr_reg): Relax the restriction on | ||
12 | subreg reload for wide mode. | ||
13 | |||
14 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236181 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
15 | --- | ||
16 | Upstream-Status: Backport | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | |||
19 | gcc/lra-constraints.c | 16 +++++++++++++++- | ||
20 | 1 file changed, 15 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c | ||
23 | index f96fd458e23..73fb72a2ea5 100644 | ||
24 | --- a/gcc/lra-constraints.c | ||
25 | +++ b/gcc/lra-constraints.c | ||
26 | @@ -1326,7 +1326,21 @@ process_addr_reg (rtx *loc, bool check_only_p, rtx_insn **before, rtx_insn **aft | ||
27 | |||
28 | subreg_p = GET_CODE (*loc) == SUBREG; | ||
29 | if (subreg_p) | ||
30 | - loc = &SUBREG_REG (*loc); | ||
31 | + { | ||
32 | + reg = SUBREG_REG (*loc); | ||
33 | + mode = GET_MODE (reg); | ||
34 | + | ||
35 | + /* For mode with size bigger than ptr_mode, there unlikely to be "mov" | ||
36 | + between two registers with different classes, but there normally will | ||
37 | + be "mov" which transfers element of vector register into the general | ||
38 | + register, and this normally will be a subreg which should be reloaded | ||
39 | + as a whole. This is particularly likely to be triggered when | ||
40 | + -fno-split-wide-types specified. */ | ||
41 | + if (in_class_p (reg, cl, &new_class) | ||
42 | + || GET_MODE_SIZE (mode) <= GET_MODE_SIZE (ptr_mode)) | ||
43 | + loc = &SUBREG_REG (*loc); | ||
44 | + } | ||
45 | + | ||
46 | reg = *loc; | ||
47 | mode = GET_MODE (reg); | ||
48 | if (! REG_P (reg)) | ||
49 | -- | ||
50 | 2.14.2 | ||
51 | |||