* [PATCH] gcc-4.8: backport fix for ICE when building opus
@ 2014-07-17 23:15 Martin Jansa
2014-07-18 13:24 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Martin Jansa @ 2014-07-17 23:15 UTC (permalink / raw)
To: openembedded-core; +Cc: Martin Jansa
From: Martin Jansa <martin.jansa@lge.com>
* backported from 4.8.2, so daisy isn't affected
Signed-off-by: Martin Jansa <martin.jansa@lge.com>
---
meta/recipes-devtools/gcc/gcc-4.8.inc | 1 +
.../gcc-4.8/0001-fix-ICE-when-building-opus.patch | 121 +++++++++++++++++++++
2 files changed, 122 insertions(+)
create mode 100644 meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch
diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
index f1260af..ac205de 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
@@ -79,6 +79,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://0047-repomembug.patch \
file://0048-PR57532.patch \
file://0048-PR58854_fix_arm_apcs_epilogue.patch \
+ file://0001-fix-ICE-when-building-opus.patch \
"
SRC_URI[md5sum] = "3b2386c114cd74185aa3754b58a79304"
SRC_URI[sha256sum] = "545b44be3ad9f2c4e90e6880f5c9d4f0a8f0e5f67e1ffb0d45da9fa01bb05813"
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch b/meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch
new file mode 100644
index 0000000..9d3aeaa
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch
@@ -0,0 +1,121 @@
+From 22228d8ba86c70381f7c34c22ac6994234d0f3e7 Mon Sep 17 00:00:00 2001
+From: xguo <xguo@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 9 Aug 2013 06:59:01 +0000
+Subject: [PATCH] gcc/ChangeLog:
+
+ Backport from mainline:
+ 2013-08-09 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ * config/arm/neon.md (vcond): Fix floating-point vector
+ comparisons against 0.
+
+gcc/testsuite/ChangeLog:
+
+ Backport from mainline:
+ 2013-08-09 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ * gcc.target/arm/lp1189445.c: New testcase.
+
+Upstream-Status: Backport from 4.8.2
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+More details in:
+http://gcc.1065356.n5.nabble.com/PATCH-ARM-Fix-unrecognizable-vector-comparisons-td947064.html
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@201620 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 8 ++++++++
+ gcc/config/arm/neon.md | 34 +++++++++++++++++++++++++++-----
+ gcc/testsuite/ChangeLog | 7 +++++++
+ gcc/testsuite/gcc.target/arm/lp1189445.c | 18 +++++++++++++++++
+ 4 files changed, 62 insertions(+), 5 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/arm/lp1189445.c
+
+diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
+index d8d4202..86a5932 100644
+--- a/gcc/config/arm/neon.md
++++ b/gcc/config/arm/neon.md
+@@ -1732,6 +1732,7 @@
+ ? 3 : 1;
+ rtx magic_rtx = GEN_INT (magic_word);
+ int inverse = 0;
++ int use_zero_form = 0;
+ int swap_bsl_operands = 0;
+ rtx mask = gen_reg_rtx (<V_cmp_result>mode);
+ rtx tmp = gen_reg_rtx (<V_cmp_result>mode);
+@@ -1742,12 +1743,16 @@
+ switch (GET_CODE (operands[3]))
+ {
+ case GE:
++ case GT:
+ case LE:
++ case LT:
+ case EQ:
+- if (!REG_P (operands[5])
+- && (operands[5] != CONST0_RTX (<MODE>mode)))
+- operands[5] = force_reg (<MODE>mode, operands[5]);
+- break;
++ if (operands[5] == CONST0_RTX (<MODE>mode))
++ {
++ use_zero_form = 1;
++ break;
++ }
++ /* Fall through. */
+ default:
+ if (!REG_P (operands[5]))
+ operands[5] = force_reg (<MODE>mode, operands[5]);
+@@ -1798,7 +1803,26 @@
+ a GT b -> a GT b
+ a LE b -> b GE a
+ a LT b -> b GT a
+- a EQ b -> a EQ b */
++ a EQ b -> a EQ b
++ Note that there also exist direct comparison against 0 forms,
++ so catch those as a special case. */
++ if (use_zero_form)
++ {
++ inverse = 0;
++ switch (GET_CODE (operands[3]))
++ {
++ case LT:
++ base_comparison = gen_neon_vclt<mode>;
++ break;
++ case LE:
++ base_comparison = gen_neon_vcle<mode>;
++ break;
++ default:
++ /* Do nothing, other zero form cases already have the correct
++ base_comparison. */
++ break;
++ }
++ }
+
+ if (!inverse)
+ emit_insn (base_comparison (mask, operands[4], operands[5], magic_rtx));
+diff --git a/gcc/testsuite/gcc.target/arm/lp1189445.c b/gcc/testsuite/gcc.target/arm/lp1189445.c
+new file mode 100644
+index 0000000..766748e
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/arm/lp1189445.c
+@@ -0,0 +1,18 @@
++/* { dg-do compile } */
++/* { dg-require-effective-target arm_neon } */
++/* { dg-add-options arm_neon } */
++/* { dg-options "-O3" } */
++
++int id;
++int
++test (const long int *data)
++{
++ int i, retval;
++ retval = id;
++ for (i = 0; i < id; i++)
++ {
++ retval &= (data[i] <= 0);
++ }
++
++ return (retval);
++}
+--
+2.0.0
+
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gcc-4.8: backport fix for ICE when building opus
2014-07-17 23:15 [PATCH] gcc-4.8: backport fix for ICE when building opus Martin Jansa
@ 2014-07-18 13:24 ` Richard Purdie
2014-07-18 14:15 ` Martin Jansa
0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2014-07-18 13:24 UTC (permalink / raw)
To: Martin Jansa; +Cc: Martin Jansa, openembedded-core
On Fri, 2014-07-18 at 01:15 +0200, Martin Jansa wrote:
> From: Martin Jansa <martin.jansa@lge.com>
>
> * backported from 4.8.2, so daisy isn't affected
>
> Signed-off-by: Martin Jansa <martin.jansa@lge.com>
> ---
> meta/recipes-devtools/gcc/gcc-4.8.inc | 1 +
> .../gcc-4.8/0001-fix-ICE-when-building-opus.patch | 121 +++++++++++++++++++++
> 2 files changed, 122 insertions(+)
> create mode 100644 meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch
Doesn't apply against master?
Cheers,
Richard
> diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
> index f1260af..ac205de 100644
> --- a/meta/recipes-devtools/gcc/gcc-4.8.inc
> +++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
> @@ -79,6 +79,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
> file://0047-repomembug.patch \
> file://0048-PR57532.patch \
> file://0048-PR58854_fix_arm_apcs_epilogue.patch \
> + file://0001-fix-ICE-when-building-opus.patch \
> "
> SRC_URI[md5sum] = "3b2386c114cd74185aa3754b58a79304"
> SRC_URI[sha256sum] = "545b44be3ad9f2c4e90e6880f5c9d4f0a8f0e5f67e1ffb0d45da9fa01bb05813"
> diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch b/meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch
> new file mode 100644
> index 0000000..9d3aeaa
> --- /dev/null
> +++ b/meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch
> @@ -0,0 +1,121 @@
> +From 22228d8ba86c70381f7c34c22ac6994234d0f3e7 Mon Sep 17 00:00:00 2001
> +From: xguo <xguo@138bc75d-0d04-0410-961f-82ee72b054a4>
> +Date: Fri, 9 Aug 2013 06:59:01 +0000
> +Subject: [PATCH] gcc/ChangeLog:
> +
> + Backport from mainline:
> + 2013-08-09 Zhenqiang Chen <zhenqiang.chen@linaro.org>
> +
> + * config/arm/neon.md (vcond): Fix floating-point vector
> + comparisons against 0.
> +
> +gcc/testsuite/ChangeLog:
> +
> + Backport from mainline:
> + 2013-08-09 Zhenqiang Chen <zhenqiang.chen@linaro.org>
> +
> + * gcc.target/arm/lp1189445.c: New testcase.
> +
> +Upstream-Status: Backport from 4.8.2
> +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> +
> +More details in:
> +http://gcc.1065356.n5.nabble.com/PATCH-ARM-Fix-unrecognizable-vector-comparisons-td947064.html
> +
> +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@201620 138bc75d-0d04-0410-961f-82ee72b054a4
> +---
> + gcc/ChangeLog | 8 ++++++++
> + gcc/config/arm/neon.md | 34 +++++++++++++++++++++++++++-----
> + gcc/testsuite/ChangeLog | 7 +++++++
> + gcc/testsuite/gcc.target/arm/lp1189445.c | 18 +++++++++++++++++
> + 4 files changed, 62 insertions(+), 5 deletions(-)
> + create mode 100644 gcc/testsuite/gcc.target/arm/lp1189445.c
> +
> +diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
> +index d8d4202..86a5932 100644
> +--- a/gcc/config/arm/neon.md
> ++++ b/gcc/config/arm/neon.md
> +@@ -1732,6 +1732,7 @@
> + ? 3 : 1;
> + rtx magic_rtx = GEN_INT (magic_word);
> + int inverse = 0;
> ++ int use_zero_form = 0;
> + int swap_bsl_operands = 0;
> + rtx mask = gen_reg_rtx (<V_cmp_result>mode);
> + rtx tmp = gen_reg_rtx (<V_cmp_result>mode);
> +@@ -1742,12 +1743,16 @@
> + switch (GET_CODE (operands[3]))
> + {
> + case GE:
> ++ case GT:
> + case LE:
> ++ case LT:
> + case EQ:
> +- if (!REG_P (operands[5])
> +- && (operands[5] != CONST0_RTX (<MODE>mode)))
> +- operands[5] = force_reg (<MODE>mode, operands[5]);
> +- break;
> ++ if (operands[5] == CONST0_RTX (<MODE>mode))
> ++ {
> ++ use_zero_form = 1;
> ++ break;
> ++ }
> ++ /* Fall through. */
> + default:
> + if (!REG_P (operands[5]))
> + operands[5] = force_reg (<MODE>mode, operands[5]);
> +@@ -1798,7 +1803,26 @@
> + a GT b -> a GT b
> + a LE b -> b GE a
> + a LT b -> b GT a
> +- a EQ b -> a EQ b */
> ++ a EQ b -> a EQ b
> ++ Note that there also exist direct comparison against 0 forms,
> ++ so catch those as a special case. */
> ++ if (use_zero_form)
> ++ {
> ++ inverse = 0;
> ++ switch (GET_CODE (operands[3]))
> ++ {
> ++ case LT:
> ++ base_comparison = gen_neon_vclt<mode>;
> ++ break;
> ++ case LE:
> ++ base_comparison = gen_neon_vcle<mode>;
> ++ break;
> ++ default:
> ++ /* Do nothing, other zero form cases already have the correct
> ++ base_comparison. */
> ++ break;
> ++ }
> ++ }
> +
> + if (!inverse)
> + emit_insn (base_comparison (mask, operands[4], operands[5], magic_rtx));
> +diff --git a/gcc/testsuite/gcc.target/arm/lp1189445.c b/gcc/testsuite/gcc.target/arm/lp1189445.c
> +new file mode 100644
> +index 0000000..766748e
> +--- /dev/null
> ++++ b/gcc/testsuite/gcc.target/arm/lp1189445.c
> +@@ -0,0 +1,18 @@
> ++/* { dg-do compile } */
> ++/* { dg-require-effective-target arm_neon } */
> ++/* { dg-add-options arm_neon } */
> ++/* { dg-options "-O3" } */
> ++
> ++int id;
> ++int
> ++test (const long int *data)
> ++{
> ++ int i, retval;
> ++ retval = id;
> ++ for (i = 0; i < id; i++)
> ++ {
> ++ retval &= (data[i] <= 0);
> ++ }
> ++
> ++ return (retval);
> ++}
> +--
> +2.0.0
> +
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gcc-4.8: backport fix for ICE when building opus
2014-07-18 13:24 ` Richard Purdie
@ 2014-07-18 14:15 ` Martin Jansa
0 siblings, 0 replies; 3+ messages in thread
From: Martin Jansa @ 2014-07-18 14:15 UTC (permalink / raw)
To: Richard Purdie; +Cc: Martin Jansa, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 6030 bytes --]
On Fri, Jul 18, 2014 at 02:24:26PM +0100, Richard Purdie wrote:
> On Fri, 2014-07-18 at 01:15 +0200, Martin Jansa wrote:
> > From: Martin Jansa <martin.jansa@lge.com>
> >
> > * backported from 4.8.2, so daisy isn't affected
> >
> > Signed-off-by: Martin Jansa <martin.jansa@lge.com>
> > ---
> > meta/recipes-devtools/gcc/gcc-4.8.inc | 1 +
> > .../gcc-4.8/0001-fix-ICE-when-building-opus.patch | 121 +++++++++++++++++++++
> > 2 files changed, 122 insertions(+)
> > create mode 100644 meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch
>
> Doesn't apply against master?
> > * backported from 4.8.2, so daisy isn't affected
4.8.2 and 4.9.0 in master also aren't affected :)
> Cheers,
>
> Richard
>
> > diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
> > index f1260af..ac205de 100644
> > --- a/meta/recipes-devtools/gcc/gcc-4.8.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
> > @@ -79,6 +79,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
> > file://0047-repomembug.patch \
> > file://0048-PR57532.patch \
> > file://0048-PR58854_fix_arm_apcs_epilogue.patch \
> > + file://0001-fix-ICE-when-building-opus.patch \
> > "
> > SRC_URI[md5sum] = "3b2386c114cd74185aa3754b58a79304"
> > SRC_URI[sha256sum] = "545b44be3ad9f2c4e90e6880f5c9d4f0a8f0e5f67e1ffb0d45da9fa01bb05813"
> > diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch b/meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch
> > new file mode 100644
> > index 0000000..9d3aeaa
> > --- /dev/null
> > +++ b/meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch
> > @@ -0,0 +1,121 @@
> > +From 22228d8ba86c70381f7c34c22ac6994234d0f3e7 Mon Sep 17 00:00:00 2001
> > +From: xguo <xguo@138bc75d-0d04-0410-961f-82ee72b054a4>
> > +Date: Fri, 9 Aug 2013 06:59:01 +0000
> > +Subject: [PATCH] gcc/ChangeLog:
> > +
> > + Backport from mainline:
> > + 2013-08-09 Zhenqiang Chen <zhenqiang.chen@linaro.org>
> > +
> > + * config/arm/neon.md (vcond): Fix floating-point vector
> > + comparisons against 0.
> > +
> > +gcc/testsuite/ChangeLog:
> > +
> > + Backport from mainline:
> > + 2013-08-09 Zhenqiang Chen <zhenqiang.chen@linaro.org>
> > +
> > + * gcc.target/arm/lp1189445.c: New testcase.
> > +
> > +Upstream-Status: Backport from 4.8.2
> > +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > +
> > +More details in:
> > +http://gcc.1065356.n5.nabble.com/PATCH-ARM-Fix-unrecognizable-vector-comparisons-td947064.html
> > +
> > +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@201620 138bc75d-0d04-0410-961f-82ee72b054a4
> > +---
> > + gcc/ChangeLog | 8 ++++++++
> > + gcc/config/arm/neon.md | 34 +++++++++++++++++++++++++++-----
> > + gcc/testsuite/ChangeLog | 7 +++++++
> > + gcc/testsuite/gcc.target/arm/lp1189445.c | 18 +++++++++++++++++
> > + 4 files changed, 62 insertions(+), 5 deletions(-)
> > + create mode 100644 gcc/testsuite/gcc.target/arm/lp1189445.c
> > +
> > +diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
> > +index d8d4202..86a5932 100644
> > +--- a/gcc/config/arm/neon.md
> > ++++ b/gcc/config/arm/neon.md
> > +@@ -1732,6 +1732,7 @@
> > + ? 3 : 1;
> > + rtx magic_rtx = GEN_INT (magic_word);
> > + int inverse = 0;
> > ++ int use_zero_form = 0;
> > + int swap_bsl_operands = 0;
> > + rtx mask = gen_reg_rtx (<V_cmp_result>mode);
> > + rtx tmp = gen_reg_rtx (<V_cmp_result>mode);
> > +@@ -1742,12 +1743,16 @@
> > + switch (GET_CODE (operands[3]))
> > + {
> > + case GE:
> > ++ case GT:
> > + case LE:
> > ++ case LT:
> > + case EQ:
> > +- if (!REG_P (operands[5])
> > +- && (operands[5] != CONST0_RTX (<MODE>mode)))
> > +- operands[5] = force_reg (<MODE>mode, operands[5]);
> > +- break;
> > ++ if (operands[5] == CONST0_RTX (<MODE>mode))
> > ++ {
> > ++ use_zero_form = 1;
> > ++ break;
> > ++ }
> > ++ /* Fall through. */
> > + default:
> > + if (!REG_P (operands[5]))
> > + operands[5] = force_reg (<MODE>mode, operands[5]);
> > +@@ -1798,7 +1803,26 @@
> > + a GT b -> a GT b
> > + a LE b -> b GE a
> > + a LT b -> b GT a
> > +- a EQ b -> a EQ b */
> > ++ a EQ b -> a EQ b
> > ++ Note that there also exist direct comparison against 0 forms,
> > ++ so catch those as a special case. */
> > ++ if (use_zero_form)
> > ++ {
> > ++ inverse = 0;
> > ++ switch (GET_CODE (operands[3]))
> > ++ {
> > ++ case LT:
> > ++ base_comparison = gen_neon_vclt<mode>;
> > ++ break;
> > ++ case LE:
> > ++ base_comparison = gen_neon_vcle<mode>;
> > ++ break;
> > ++ default:
> > ++ /* Do nothing, other zero form cases already have the correct
> > ++ base_comparison. */
> > ++ break;
> > ++ }
> > ++ }
> > +
> > + if (!inverse)
> > + emit_insn (base_comparison (mask, operands[4], operands[5], magic_rtx));
> > +diff --git a/gcc/testsuite/gcc.target/arm/lp1189445.c b/gcc/testsuite/gcc.target/arm/lp1189445.c
> > +new file mode 100644
> > +index 0000000..766748e
> > +--- /dev/null
> > ++++ b/gcc/testsuite/gcc.target/arm/lp1189445.c
> > +@@ -0,0 +1,18 @@
> > ++/* { dg-do compile } */
> > ++/* { dg-require-effective-target arm_neon } */
> > ++/* { dg-add-options arm_neon } */
> > ++/* { dg-options "-O3" } */
> > ++
> > ++int id;
> > ++int
> > ++test (const long int *data)
> > ++{
> > ++ int i, retval;
> > ++ retval = id;
> > ++ for (i = 0; i < id; i++)
> > ++ {
> > ++ retval &= (data[i] <= 0);
> > ++ }
> > ++
> > ++ return (retval);
> > ++}
> > +--
> > +2.0.0
> > +
> > --
> > 1.9.1
> >
>
>
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-18 14:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-17 23:15 [PATCH] gcc-4.8: backport fix for ICE when building opus Martin Jansa
2014-07-18 13:24 ` Richard Purdie
2014-07-18 14:15 ` Martin Jansa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox