re PR target/58115 (testcase gcc.target/i386/intrinsics_4.c failure)
gcc/ PR target/58115 * target-globals.c (save_target_globals): Remove this_fn_optab handling. * toplev.c: Include optabs.h. (target_reinit): Temporarily restore the global options if another set of options are in force. gcc/testsuite/ * gcc.target/i386/intrinsics_4.c (bar): New function. From-SVN: r206394
This commit is contained in:
parent
14c12d0de0
commit
48d534390f
5 changed files with 48 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
|||
2014-01-07 Richard Sandiford <rdsandiford@googlemail.com>
|
||||
|
||||
PR target/58115
|
||||
* target-globals.c (save_target_globals): Remove this_fn_optab
|
||||
handling.
|
||||
* toplev.c: Include optabs.h.
|
||||
(target_reinit): Temporarily restore the global options if another
|
||||
set of options are in force.
|
||||
|
||||
2014-01-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/58668
|
||||
|
|
|
@ -68,7 +68,6 @@ struct target_globals *
|
|||
save_target_globals (void)
|
||||
{
|
||||
struct target_globals *g;
|
||||
struct target_optabs *saved_this_fn_optabs = this_fn_optabs;
|
||||
|
||||
g = ggc_alloc_target_globals ();
|
||||
g->flag_state = XCNEW (struct target_flag_state);
|
||||
|
@ -88,10 +87,8 @@ save_target_globals (void)
|
|||
g->bb_reorder = XCNEW (struct target_bb_reorder);
|
||||
g->lower_subreg = XCNEW (struct target_lower_subreg);
|
||||
restore_target_globals (g);
|
||||
this_fn_optabs = this_target_optabs;
|
||||
init_reg_sets ();
|
||||
target_reinit ();
|
||||
this_fn_optabs = saved_this_fn_optabs;
|
||||
return g;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-01-07 Richard Sandiford <rdsandiford@googlemail.com>
|
||||
|
||||
* gcc.target/i386/intrinsics_4.c (bar): New function.
|
||||
|
||||
2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* g++.dg/ext/is_base_of_incomplete-2.C: New.
|
||||
|
|
|
@ -12,3 +12,10 @@ foo (void)
|
|||
{
|
||||
a[0] = _mm256_and_ps (b[0], c[0]);
|
||||
}
|
||||
|
||||
/* Try again with a combination of target and optimization attributes. */
|
||||
void __attribute__((target ("avx"), optimize(3)))
|
||||
bar (void)
|
||||
{
|
||||
a[0] = _mm256_and_ps (b[0], c[0]);
|
||||
}
|
||||
|
|
29
gcc/toplev.c
29
gcc/toplev.c
|
@ -78,6 +78,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
#include "diagnostic-color.h"
|
||||
#include "context.h"
|
||||
#include "pass_manager.h"
|
||||
#include "optabs.h"
|
||||
|
||||
#if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO)
|
||||
#include "dbxout.h"
|
||||
|
@ -1752,6 +1753,23 @@ target_reinit (void)
|
|||
{
|
||||
struct rtl_data saved_x_rtl;
|
||||
rtx *saved_regno_reg_rtx;
|
||||
tree saved_optimization_current_node;
|
||||
struct target_optabs *saved_this_fn_optabs;
|
||||
|
||||
/* Temporarily switch to the default optimization node, so that
|
||||
*this_target_optabs is set to the default, not reflecting
|
||||
whatever a previous function used for the optimize
|
||||
attribute. */
|
||||
saved_optimization_current_node = optimization_current_node;
|
||||
saved_this_fn_optabs = this_fn_optabs;
|
||||
if (saved_optimization_current_node != optimization_default_node)
|
||||
{
|
||||
optimization_current_node = optimization_default_node;
|
||||
cl_optimization_restore
|
||||
(&global_options,
|
||||
TREE_OPTIMIZATION (optimization_default_node));
|
||||
}
|
||||
this_fn_optabs = this_target_optabs;
|
||||
|
||||
/* Save *crtl and regno_reg_rtx around the reinitialization
|
||||
to allow target_reinit being called even after prepare_function_start. */
|
||||
|
@ -1769,7 +1787,16 @@ target_reinit (void)
|
|||
/* Reinitialize lang-dependent parts. */
|
||||
lang_dependent_init_target ();
|
||||
|
||||
/* And restore it at the end, as free_after_compilation from
|
||||
/* Restore the original optimization node. */
|
||||
if (saved_optimization_current_node != optimization_default_node)
|
||||
{
|
||||
optimization_current_node = saved_optimization_current_node;
|
||||
cl_optimization_restore (&global_options,
|
||||
TREE_OPTIMIZATION (optimization_current_node));
|
||||
}
|
||||
this_fn_optabs = saved_this_fn_optabs;
|
||||
|
||||
/* Restore regno_reg_rtx at the end, as free_after_compilation from
|
||||
expand_dummy_function_end clears it. */
|
||||
if (saved_regno_reg_rtx)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue