summaryrefslogtreecommitdiff
path: root/debian/patches/pr60818.diff
blob: 08627b1400f636d02b5780e02d6662b4968173c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 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;