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 <dmalc...@redhat.com> +2014-08-22 Ganesh Gopalasubramanian <ganesh.gopalasubraman...@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 <dmalc...@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"))) ])