Fix bugs in Function Multiversioning.

2013-01-02  Sriraman Tallam  <tmsriram@google.com>

	* config/i386/i386.c (ix86_get_function_versions_dispatcher): Fix bug
	in loop predicate.
	(fold_builtin_cpu): Do not share cpu model decls across statements.

From-SVN: r194818
This commit is contained in:
Sriraman Tallam 2013-01-02 20:23:38 +00:00 committed by Sriraman Tallam
parent 868f97d5fa
commit 6a7da30fd7
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2013-01-02 Sriraman Tallam <tmsriram@google.com>
* config/i386/i386.c (ix86_get_function_versions_dispatcher): Fix bug
in loop predicate.
(fold_builtin_cpu): Do not share cpu model decls across statements.
2013-01-02 Jason Merrill <jason@redhat.com>
PR c++/55804

View File

@ -29290,7 +29290,7 @@ ix86_get_function_versions_dispatcher (void *decl)
/* Set the dispatcher for all the versions. */
it_v = default_version_info;
while (it_v->next != NULL)
while (it_v != NULL)
{
it_v->dispatcher_resolver = dispatch_decl;
it_v = it_v->next;
@ -29626,8 +29626,8 @@ fold_builtin_cpu (tree fndecl, tree *args)
{"avx2", F_AVX2}
};
static tree __processor_model_type = NULL_TREE;
static tree __cpu_model_var = NULL_TREE;
tree __processor_model_type = NULL_TREE;
tree __cpu_model_var = NULL_TREE;
if (__processor_model_type == NULL_TREE)
__processor_model_type = build_processor_model_struct ();