]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix bugs in Function Multiversioning.
authorSriraman Tallam <tmsriram@google.com>
Wed, 2 Jan 2013 20:23:38 +0000 (20:23 +0000)
committerSriraman Tallam <tmsriram@gcc.gnu.org>
Wed, 2 Jan 2013 20:23:38 +0000 (20:23 +0000)
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

gcc/ChangeLog
gcc/config/i386/i386.c

index 4b3834b29237ccef6a9897dac99c6e3ce04c6271..95f8d8bc4f18c8bbfb62011dd6319f62329cd546 100644 (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
index 08eb06cded851222e69f9fde1be5a1b686fee7b8..ee2b052bb9a5126965e61d630f95a73f7f5af7e5 100644 (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 ();