This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, i386] PR61360: Do not update "enabled" attribute during lra and reload passes


This patch fixes PR 61360.

The attribute "enabled" should actually be used enable/disable alternative based on sub-targets.
In this pattern, it gets used across passes too. 
However, modifying this attribute in LRA pass is not something it is meant for.
This patch allows enabling/disabling the attribute when optimizing for size, but not during lra pass or reload pass.

Bootstrap passes.
OK for upstream?

Regards
Ganesh

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6d91da0..3775f6e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,10 @@
-2014-08-22  David Malcolm  <dmalcolm@redhat.com>
+2014-08-22 Ganesh Gopalasubramanian  <Ganesh.Gopalasubramanian@amd.com>
+
+       PR 61360
+       * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_sse):
+       Do not modify "enabled" attribute during LRA pass.
+
+014-08-22  David Malcolm  <dmalcolm@redhat.com>

        * cprop.c (struct occr): Strengthen field "insn" from rtx to
        rtx_insn *.
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 8e74eab..de2ecf0 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -4795,10 +4795,10 @@
               /* ??? For sched1 we need constrain_operands to be able to
                  select an alternative.  Leave this enabled before RA.  */
               (symbol_ref "TARGET_INTER_UNIT_CONVERSIONS
-                           || optimize_function_for_size_p (cfun)
-                           || !(reload_completed
-                                || reload_in_progress
-                                || lra_in_progress)")
+                           || (optimize_function_for_size_p (cfun)
+                               && !(reload_completed
+                                    || reload_in_progress
+                                    || lra_in_progress))")
            ]
            (symbol_ref "true")))
    ])


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]