* Request to backport two -mvzeroupper related patches to 4.6 branch
@ 2011-06-29 7:05 Fang, Changpeng
2011-07-03 9:54 ` Uros Bizjak
0 siblings, 1 reply; 2+ messages in thread
From: Fang, Changpeng @ 2011-06-29 7:05 UTC (permalink / raw)
To: Richard Guenther
Cc: Jagasia, Harsha, H.J. Lu, gcc-patches, hubicka, ubizjak, hongjiu.lu
[-- Attachment #1: Type: text/plain, Size: 753 bytes --]
Hi,
Attached are two patches in gcc 4.7 trunk that we request to backport to 4.6 branch.
There are all related to -mvzerupper
1)
0001-Save-the-initial-options-after-checking-vzeroupper.patch
This patch fixes bug 47315, ICE: in extract_insn, at recog.c:2109 (unrecognizable insn) with -mvzeroupper and __attribute__((target("avx")))
The patch was committed to trunk: 2011-05-23 H.J. Lu <hongjiu.lu@intel.com>
The bug still exists in gcc 4.6.1. Backporting this patches would fix it.
2).
0001--config-i386-i386.c-ix86_reorg-Run-move_or_dele.patch
This patch Run move_or_delete_vzeroupper first, and was committed to trunk:
2011-05-04 Uros Bizjak <ubizjak@gmail.com>
Is It OK to commit to 4.6 branch?
Thanks,
Changpeng
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Save-the-initial-options-after-checking-vzeroupper.patch --]
[-- Type: text/x-patch; name="0001-Save-the-initial-options-after-checking-vzeroupper.patch", Size: 3128 bytes --]
From 0b70e1e33afa25536305f4a228409cf9b4e0eaad Mon Sep 17 00:00:00 2001
From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 23 May 2011 16:51:42 +0000
Subject: [PATCH] Save the initial options after checking vzeroupper.
gcc/
2011-05-23 H.J. Lu <hongjiu.lu@intel.com>
PR target/47315
* config/i386/i386.c (ix86_option_override_internal): Save the
initial options after checking vzeroupper.
gcc/testsuite/
2011-05-23 H.J. Lu <hongjiu.lu@intel.com>
PR target/47315
* gcc.target/i386/pr47315.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174078 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/ChangeLog | 6 ++++++
gcc/config/i386/i386.c | 11 ++++++-----
gcc/testsuite/ChangeLog | 5 +++++
gcc/testsuite/gcc.target/i386/pr47315.c | 10 ++++++++++
4 files changed, 27 insertions(+), 5 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/i386/pr47315.c
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a3cb0f1..1d46b04 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/47315
+ * config/i386/i386.c (ix86_option_override_internal): Save the
+ initial options after checking vzeroupper.
+
2011-05-23 David Li <davidxl@google.com>
PR tree-optimization/48988
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 0709be8..854e376 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4191,11 +4191,6 @@ ix86_option_override_internal (bool main_args_p)
#endif
}
- /* Save the initial options in case the user does function specific options */
- if (main_args_p)
- target_option_default_node = target_option_current_node
- = build_target_option_node ();
-
if (TARGET_AVX)
{
/* When not optimize for size, enable vzeroupper optimization for
@@ -4217,6 +4212,12 @@ ix86_option_override_internal (bool main_args_p)
/* Disable vzeroupper pass if TARGET_AVX is disabled. */
target_flags &= ~MASK_VZEROUPPER;
}
+
+ /* Save the initial options in case the user does function specific
+ options. */
+ if (main_args_p)
+ target_option_default_node = target_option_current_node
+ = build_target_option_node ();
}
/* Return TRUE if VAL is passed in register with 256bit AVX modes. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 72aae61..85137d0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/47315
+ * gcc.target/i386/pr47315.c: New test.
+
2011-05-23 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/lambda/lambda-eh2.C: New.
diff --git a/gcc/testsuite/gcc.target/i386/pr47315.c b/gcc/testsuite/gcc.target/i386/pr47315.c
new file mode 100644
index 0000000..871d3f1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr47315.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -mvzeroupper" } */
+
+__attribute__ ((__target__ ("avx")))
+float bar (float f) {}
+
+void foo (float f)
+{
+ bar (f);
+}
--
1.6.0.2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0001--config-i386-i386.c-ix86_reorg-Run-move_or_dele.patch --]
[-- Type: text/x-patch; name="0001--config-i386-i386.c-ix86_reorg-Run-move_or_dele.patch", Size: 2422 bytes --]
From 343f07cbec2d66bebe71e4f48b0403f52ebfe8f9 Mon Sep 17 00:00:00 2001
From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 4 May 2011 17:07:03 +0000
Subject: [PATCH] * config/i386/i386.c (ix86_reorg): Run move_or_delete_vzeroupper first.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173383 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/ChangeLog | 16 ++++++++++------
gcc/config/i386/i386.c | 8 ++++----
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5412506..ca85616 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-04 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (ix86_reorg): Run move_or_delete_vzeroupper first.
+
2011-05-04 Eric Botcazou <ebotcazou@adacore.com>
* stor-layout.c (variable_size): Do not issue errors.
@@ -263,9 +267,9 @@
2011-05-03 Stuart Henderson <shenders@gcc.gnu.org>
- From Mike Frysinger:
- * config/bfin/bfin.c (bfin_cpus[]): Add 0.4 for
- bf542/bf544/bf547/bf548/bf549.
+ From Mike Frysinger:
+ * config/bfin/bfin.c (bfin_cpus[]): Add 0.4 for
+ bf542/bf544/bf547/bf548/bf549.
2011-05-03 Uros Bizjak <ubizjak@gmail.com>
@@ -575,9 +579,9 @@
2011-05-02 Stuart Henderson <shenders@gcc.gnu.org>
- PR target/47951
- * config/bfin/bfin.md (loop_end): Use matching constraints to ensure
- inputs match the output.
+ PR target/47951
+ * config/bfin/bfin.md (loop_end): Use matching constraints to ensure
+ inputs match the output.
2011-05-02 Andreas Schwab <schwab@linux-m68k.org>
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 79dd5da..786bc6d 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -30444,6 +30444,10 @@ ix86_reorg (void)
with old MDEP_REORGS that are not CFG based. Recompute it now. */
compute_bb_for_insn ();
+ /* Run the vzeroupper optimization if needed. */
+ if (TARGET_VZEROUPPER)
+ move_or_delete_vzeroupper ();
+
if (optimize && optimize_function_for_speed_p (cfun))
{
if (TARGET_PAD_SHORT_FUNCTION)
@@ -30455,10 +30459,6 @@ ix86_reorg (void)
ix86_avoid_jump_mispredicts ();
#endif
}
-
- /* Run the vzeroupper optimization if needed. */
- if (TARGET_VZEROUPPER)
- move_or_delete_vzeroupper ();
}
/* Return nonzero when QImode register that must be represented via REX prefix
--
1.6.0.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Request to backport two -mvzeroupper related patches to 4.6 branch
2011-06-29 7:05 Request to backport two -mvzeroupper related patches to 4.6 branch Fang, Changpeng
@ 2011-07-03 9:54 ` Uros Bizjak
0 siblings, 0 replies; 2+ messages in thread
From: Uros Bizjak @ 2011-07-03 9:54 UTC (permalink / raw)
To: Fang, Changpeng
Cc: Richard Guenther, Jagasia, Harsha, H.J. Lu, gcc-patches, hubicka,
hongjiu.lu
On Wed, Jun 29, 2011 at 2:58 AM, Fang, Changpeng <Changpeng.Fang@amd.com> wrote:
> Attached are two patches in gcc 4.7 trunk that we request to backport to 4.6 branch.
> There are all related to -mvzerupper
>
> 1)
> 0001-Save-the-initial-options-after-checking-vzeroupper.patch
> This patch fixes bug 47315, ICE: in extract_insn, at recog.c:2109 (unrecognizable insn) with -mvzeroupper and __attribute__((target("avx")))
>
> The patch was committed to trunk: 2011-05-23 H.J. Lu <hongjiu.lu@intel.com>
>
> The bug still exists in gcc 4.6.1. Backporting this patches would fix it.
>
> 2).
> 0001--config-i386-i386.c-ix86_reorg-Run-move_or_dele.patch
> This patch Run move_or_delete_vzeroupper first, and was committed to trunk:
> 2011-05-04 Uros Bizjak <ubizjak@gmail.com>
>
>
> Is It OK to commit to 4.6 branch?
This is OK for the branch.
Thanks,
Uros.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-03 9:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-29 7:05 Request to backport two -mvzeroupper related patches to 4.6 branch Fang, Changpeng
2011-07-03 9:54 ` Uros Bizjak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).