From 37ca383f9142a8c5ce8196c7b2f2d9aec2306bda Mon Sep 17 00:00:00 2001 From: Aaron Sawdey Date: Fri, 30 Mar 2018 12:17:31 +0000 Subject: [PATCH] re PR target/83822 (trunk/gcc/config/rs6000/rs6000-string.c:970]: (style) Redundant condition) 2018-03-30 Aaron Sawdey PR target/83822 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant condition. * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant condition. From-SVN: r258975 --- gcc/ChangeLog | 8 ++++++++ gcc/config/rs6000/rs6000-c.c | 3 +-- gcc/config/rs6000/rs6000-string.c | 3 +-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 132d979c9ea..9114947a763 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2018-03-30 Aaron Sawdey + + PR target/83822 + * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant + condition. + * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant + condition. + 2018-03-30 Julia Koval PR target/84413 diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index ff6d05f93c0..8e0834a5d2e 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -642,8 +642,7 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile) cpp_get_callbacks (pfile)->macro_to_expand = rs6000_macro_to_expand; } } - if (!TARGET_HARD_FLOAT - || (TARGET_HARD_FLOAT && !TARGET_DOUBLE_FLOAT)) + if (!TARGET_HARD_FLOAT || !TARGET_DOUBLE_FLOAT) builtin_define ("_SOFT_DOUBLE"); /* Used by lwarx/stwcx. errata work-around. */ if (rs6000_cpu == PROCESSOR_PPC405) diff --git a/gcc/config/rs6000/rs6000-string.c b/gcc/config/rs6000/rs6000-string.c index e817f3db200..c70a4802119 100644 --- a/gcc/config/rs6000/rs6000-string.c +++ b/gcc/config/rs6000/rs6000-string.c @@ -966,8 +966,7 @@ expand_compare_loop (rtx operands[]) rtx final_cleanup = gen_label_rtx (); rtx cmp_rem_before = gen_reg_rtx (word_mode); /* Compare one more word_mode chunk if needed. */ - if (!bytes_is_const - || (bytes_is_const && bytes_remaining >= load_mode_size)) + if (!bytes_is_const || bytes_remaining >= load_mode_size) { /* If remainder length < word length, branch to final cleanup compare. */ -- 2.30.2