]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* tree-ssa-alias.c (same_type_for_tbaa): Return ture if main
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 May 2019 18:13:51 +0000 (18:13 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 May 2019 18:13:51 +0000 (18:13 +0000)
variants are pointer equivalent.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@271747 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-ssa-alias.c

index 4452293257c5a6a877b8b258760769becd7f9c16..a3056bfcafe8fade48bc57b6fa1c84332905e531 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-29  Jan Hubicka  <jh@suse.cz>
+
+       * tree-ssa-alias.c (same_type_for_tbaa): Return ture if main
+       variants are pointer equivalent.
+
 2019-05-29  Alejandro Martinez  <alejandro.martinezvicente@arm.com>
 
        * config/aarch64/aarch64-c.c: Added TARGET_SVE2.
index 33c15f52bebaff770ff857e20a7e61d7c6c553e7..3ecb337ffdf2a53d2197075773c39793c9ae4ca3 100644 (file)
@@ -787,6 +787,10 @@ same_type_for_tbaa (tree type1, tree type2)
   type1 = TYPE_MAIN_VARIANT (type1);
   type2 = TYPE_MAIN_VARIANT (type2);
 
+  /* Handle the most common case first.  */
+  if (type1 == type2)
+    return 1;
+
   /* If we would have to do structural comparison bail out.  */
   if (TYPE_STRUCTURAL_EQUALITY_P (type1)
       || TYPE_STRUCTURAL_EQUALITY_P (type2))