[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#861945: gcc-6: Please backport fix for PR/60818 from the trunk



Source: gcc-6
Version: 6.3.0-16
Severity: normal
Tags: patch
User: debian-powerpc@lists.debian.org
Usertags: powerpcspe

Hi!

The gcc trunk and thus gcc-7 contains a fix for the RTL optimizer that
affects powerpcspe [1]. Unfortunately, the patch for this PR (60818)
has not been backported to the gcc-6 trunk yet.

Would it be possible to include the patch to the gcc-6 package?

I'm attaching the patch taken from the trunk, already in the proper
format to be added to the gcc-6 package.

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
# Fix PR rtl-optimization/60818, taken from the trunk.

gcc/

2017-04-04  Segher Boessenkool  <segher@kernel.crashing.org>

 	PR rtl-optimization/60818
 	* simplify-rtx.c (simplify_binary_operation_1): Do not replace
 	a compare of comparisons with the thing compared if this results
 	in a different machine mode.

--- a/src/gcc/simplify-rtx.c	2017/04/03 22:57:32	246665
+++ b/src/gcc/simplify-rtx.c	2017/04/04 00:10:02	246666
@@ -2306,10 +2306,10 @@
 	      return xop00;
 
 	    if (REG_P (xop00) && REG_P (xop10)
-		&& GET_MODE (xop00) == GET_MODE (xop10)
 		&& REGNO (xop00) == REGNO (xop10)
-		&& GET_MODE_CLASS (GET_MODE (xop00)) == MODE_CC
-		&& GET_MODE_CLASS (GET_MODE (xop10)) == MODE_CC)
+		&& GET_MODE (xop00) == mode
+		&& GET_MODE (xop10) == mode
+		&& GET_MODE_CLASS (mode) == MODE_CC)
 	      return xop00;
 	}
       break;


Reply to: