This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, i386] PR61360: Do not update "enabled" attribute during lra and reload passes
- From: "Gopalasubramanian, Ganesh" <Ganesh dot Gopalasubramanian at amd dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: "Uros Bizjak (ubizjak at gmail dot com)" <ubizjak at gmail dot com>, "Richard Henderson (rth at redhat dot com)" <rth at redhat dot com>, "Vladimir Makarov (vmakarov at redhat dot com)" <vmakarov at redhat dot com>
- Date: Fri, 22 Aug 2014 10:57:43 +0000
- Subject: [PATCH, i386] PR61360: Do not update "enabled" attribute during lra and reload passes
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is 165.204.84.221) smtp dot mailfrom=Ganesh dot Gopalasubramanian at amd dot com;
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")))
])