Remove unnecessary fold_convert in gfc_(un)likely

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
This commit is contained in:
Janne Blomqvist 2017-09-25 09:44:18 +03:00
parent 28a8cba039
commit b35659407b
2 changed files with 5 additions and 2 deletions

View 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>

View 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;
}