aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99377.patch
blob: d51f0874e3ee5ba6bd024722776d5746a49c71a7 (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
	Issue #1510
	2007-04-27  Paul Brook  <paul@codesourcery.com>
	gcc/
	* cse.c (cse_process_notes): Make sure PLUS are canonical.

2010-08-26  Paul Brook  <paul@codesourcery.com>

	Merge from Sourcery G++ 4.3/4.4:
 	2007-03-30  Paul Brook  <paul@codesourcery.com>
 	gcc/
 	* calls.c (store_one_arg): Check alignment of mode used for save.

=== modified file 'gcc/cse.c'
--- old/gcc/cse.c	2010-01-12 20:25:10 +0000
+++ new/gcc/cse.c	2010-08-26 15:53:20 +0000
@@ -6061,6 +6061,11 @@
       validate_change (object, &XEXP (x, i),
 		       cse_process_notes (XEXP (x, i), object, changed), 0);
 
+  /* Rebuild a PLUS expression in canonical form if the first operand
+     ends up as a constant.  */
+  if (code == PLUS && GET_CODE (XEXP (x, 0)) == CONST_INT)
+    return plus_constant (XEXP(x, 1), INTVAL (XEXP (x, 0)));
+
   return x;
 }