diff mbox series

[rs6000] PR target/83822 fix redundant conditions

Message ID 1522351793.7066.3.camel@linux.vnet.ibm.com
State New
Headers show
Series [rs6000] PR target/83822 fix redundant conditions | expand

Commit Message

Aaron Sawdey March 29, 2018, 7:29 p.m. UTC
I've fixed the redundant conditions in the expressions pointed out by
83822. Bootstrap/regtest passes on ppc64le, ok for trunk?

    Aaron


2018-03-29  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>

	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.

Comments

Segher Boessenkool March 29, 2018, 9:52 p.m. UTC | #1
On Thu, Mar 29, 2018 at 02:29:53PM -0500, Aaron Sawdey wrote:
> I've fixed the redundant conditions in the expressions pointed out by
> 83822. Bootstrap/regtest passes on ppc64le, ok for trunk?

This is fine, thanks!


Segher


> 2018-03-29  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
> 
> 	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.
diff mbox series

Patch

Index: gcc/config/rs6000/rs6000-c.c
===================================================================
--- gcc/config/rs6000/rs6000-c.c	(revision 258900)
+++ gcc/config/rs6000/rs6000-c.c	(working copy)
@@ -642,8 +642,7 @@ 
 	  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)
Index: gcc/config/rs6000/rs6000-string.c
===================================================================
--- gcc/config/rs6000/rs6000-string.c	(revision 258900)
+++ gcc/config/rs6000/rs6000-string.c	(working copy)
@@ -966,8 +966,7 @@ 
       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.  */