Remove unnecessary fold_convert in gfc_(un)likely
authorJanne Blomqvist <jb@gcc.gnu.org>
Mon, 25 Sep 2017 06:44:18 +0000 (09:44 +0300)
committerJanne Blomqvist <jb@gcc.gnu.org>
Mon, 25 Sep 2017 06:44:18 +0000 (09:44 +0300)
This patch removes an unnecessary fold_convert to boolean_type_node at
the end of gfc_likely and gfc_unlikely.  It makes no difference to the
generated code, but makes tree dumps a little bit cleaner.

2017-09-25  Janne Blomqvist  <jb@gcc.gnu.org>
        * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
        (gfc_likely): Likewise.

Regtested on x86_64-pc-linux-gnu.

From-SVN: r253132

gcc/fortran/ChangeLog
gcc/fortran/trans.c

index 29504c85b18527efa288138fd65d5737760b4523..4d64a959dbfdece58472627e6b2c6d5d30f057fc 100644 (file)
@@ -1,3 +1,8 @@
+2017-09-25  Janne Blomqvist  <jb@gcc.gnu.org>
+
+       * trans.c (gfc_unlikely): Remove unnecessary fold_convert.
+       (gfc_likely): Likewise.
+
 2017-09-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
            Steven G. Kargl  <kargl@gcc.gnu.org>
 
index 149f482586f992705ca9e681a3fef19b99bcebfe..53bc4285c7889179bc616481240c2b66fad99e81 100644 (file)
@@ -2275,7 +2275,6 @@ gfc_unlikely (tree cond, enum br_predictor predictor)
                                  build_int_cst (integer_type_node,
                                                 predictor));
     }
-  cond = fold_convert (boolean_type_node, cond);
   return cond;
 }
 
@@ -2297,7 +2296,6 @@ gfc_likely (tree cond, enum br_predictor predictor)
                                  build_int_cst (integer_type_node,
                                                 predictor));
     }
-  cond = fold_convert (boolean_type_node, cond);
   return cond;
 }