diff mbox

Request to backport two -mvzeroupper related patches to 4.6 branch

Message ID D4C76825A6780047854A11E93CDE84D005980DC720@SAUSEXMBP01.amd.com
State New
Headers show

Commit Message

Fang, Changpeng June 29, 2011, 12:58 a.m. UTC
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

Comments

Uros Bizjak July 3, 2011, 9:54 a.m. UTC | #1
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.
diff mbox

Patch

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