Merge lp:~rsandifo/gcc-linaro/lp721531-4.5 into lp:gcc-linaro/4.5
- lp721531-4.5
- Merge into 4.5
Status: | Superseded |
---|---|
Proposed branch: | lp:~rsandifo/gcc-linaro/lp721531-4.5 |
Merge into: | lp:gcc-linaro/4.5 |
Diff against target: |
183 lines (+96/-16) (has conflicts) 4 files modified
ChangeLog.linaro (+52/-0) gcc/builtins.c (+23/-2) gcc/fold-const.c (+6/-14) gcc/testsuite/gcc.dg/torture/pr49169.c (+15/-0) Text conflict in ChangeLog.linaro |
To merge this branch: | bzr merge lp:~rsandifo/gcc-linaro/lp721531-4.5 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Linaro Toolchain Developers | Pending | ||
Review via email:
|
This proposal supersedes a proposal from 2011-06-27.
This proposal has been superseded by a proposal from 2011-07-04.
Commit message
Description of the change
Include fix for x86_64 regressions.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal | # |
cbuild successfully built this on i686-lucid-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro+bzr99485:
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: g++.dg/
+FAIL: g++.dg/
The full testsuite results are at:
http://
cbuild-checked: i686-lucid-
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal | # |
cbuild successfully built this on x86_64-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro+bzr99485:
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
+PASS: gcc.dg/
-PASS: g++.dg/
+FAIL: g++.dg/
The full testsuite results are at:
http://
cbuild-checked: x86_64-
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild has taken a snapshot of this branch at r99487 and queued it for build.
The snapshot is available at:
http://
and will be built on the following builders:
a9-builder armv5-builder i686 x86_64
You can track the build queue at:
http://
cbuild-snapshot: gcc-linaro-
cbuild-ancestor: lp:gcc-linaro+bzr99485
cbuild-state: check
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on i686-lucid-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro+bzr99485:
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
The full testsuite results are at:
http://
cbuild-checked: i686-lucid-
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on x86_64-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro+bzr99485:
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
+UNSUPPORTED: gcc.dg/
The full testsuite results are at:
http://
cbuild-checked: x86_64-
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on armv7l-
The build results are available at:
http://
The test suite was not checked as the branch point lp:gcc-linaro+bzr99485 has nothing to compare against.
The full testsuite results are at:
http://
cbuild-checked: armv7l-
Preview Diff
1 | === modified file 'ChangeLog.linaro' | |||
2 | --- ChangeLog.linaro 2011-07-01 11:24:39 +0000 | |||
3 | +++ ChangeLog.linaro 2011-07-04 10:20:08 +0000 | |||
4 | @@ -1,3 +1,4 @@ | |||
5 | 1 | <<<<<<< TREE | ||
6 | 1 | 2011-07-01 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org> | 2 | 2011-07-01 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org> |
7 | 2 | 3 | ||
8 | 3 | Backport from mainline. | 4 | Backport from mainline. |
9 | @@ -525,6 +526,57 @@ | |||
10 | 525 | * function.c (prepare_shrink_wrap): New function. | 526 | * function.c (prepare_shrink_wrap): New function. |
11 | 526 | (thread_prologue_and_epilogue_insns): Call it. | 527 | (thread_prologue_and_epilogue_insns): Call it. |
12 | 527 | 528 | ||
13 | 529 | ======= | ||
14 | 530 | 2011-07-04 Richard Sandiford <rdsandiford@googlemail.com> | ||
15 | 531 | |||
16 | 532 | gcc/ | ||
17 | 533 | * builtins.c (get_object_alignment): Fix comment. | ||
18 | 534 | * fold-const.c (get_pointer_modulus_and_residue): Remove | ||
19 | 535 | allow_func_align. Use get_object_alignment. | ||
20 | 536 | (fold_binary_loc): Update caller. | ||
21 | 537 | |||
22 | 538 | 2011-06-29 Richard Sandiford <rdsandiford@googlemail.com> | ||
23 | 539 | |||
24 | 540 | gcc/ | ||
25 | 541 | Backport from mainline: | ||
26 | 542 | |||
27 | 543 | 2011-06-29 Richard Sandiford <richard.sandiford@linaro.org> | ||
28 | 544 | |||
29 | 545 | PR tree-optimization/49545 | ||
30 | 546 | * builtins.c (get_object_alignment_1): Update function comment. | ||
31 | 547 | Do not use DECL_ALIGN for functions, but test | ||
32 | 548 | TARGET_PTRMEMFUNC_VBIT_LOCATION instead. | ||
33 | 549 | * fold-const.c (get_pointer_modulus_and_residue): Don't check | ||
34 | 550 | for functions here. | ||
35 | 551 | |||
36 | 552 | gcc/testsuite/ | ||
37 | 553 | Backport from mainline: | ||
38 | 554 | |||
39 | 555 | 2011-06-29 Richard Sandiford <richard.sandiford@linaro.org> | ||
40 | 556 | |||
41 | 557 | * gcc.dg/torture/pr49169.c: Restrict to ARM and MIPS targets. | ||
42 | 558 | |||
43 | 559 | 2011-06-27 Richard Sandiford <richard.sandiford@linaro.org> | ||
44 | 560 | |||
45 | 561 | gcc/ | ||
46 | 562 | Backport from mainline: | ||
47 | 563 | |||
48 | 564 | 2011-07-27 Richard Guenther <rguenther@suse.de> | ||
49 | 565 | |||
50 | 566 | PR tree-optimization/49169 | ||
51 | 567 | * fold-const.c (get_pointer_modulus_and_residue): Don't rely on | ||
52 | 568 | the alignment of function decls. | ||
53 | 569 | |||
54 | 570 | gcc/testsuite/ | ||
55 | 571 | Backport from mainline: | ||
56 | 572 | |||
57 | 573 | 2011-07-27 Michael Hope <michael.hope@linaro.org> | ||
58 | 574 | Richard Sandiford <richard.sandiford@linaro.org> | ||
59 | 575 | |||
60 | 576 | PR tree-optimization/49169 | ||
61 | 577 | * gcc.dg/torture/pr49169.c: New test. | ||
62 | 578 | |||
63 | 579 | >>>>>>> MERGE-SOURCE | ||
64 | 528 | 2011-03-03 Andrew Stubbs <ams@codesourcery.com> | 580 | 2011-03-03 Andrew Stubbs <ams@codesourcery.com> |
65 | 529 | 581 | ||
66 | 530 | gcc/ | 582 | gcc/ |
67 | 531 | 583 | ||
68 | === modified file 'gcc/builtins.c' | |||
69 | --- gcc/builtins.c 2011-01-06 11:02:44 +0000 | |||
70 | +++ gcc/builtins.c 2011-07-04 10:20:08 +0000 | |||
71 | @@ -263,7 +263,14 @@ | |||
72 | 263 | 263 | ||
73 | 264 | /* Return the alignment in bits of EXP, an object. | 264 | /* Return the alignment in bits of EXP, an object. |
74 | 265 | Don't return more than MAX_ALIGN no matter what, ALIGN is the inital | 265 | Don't return more than MAX_ALIGN no matter what, ALIGN is the inital |
76 | 266 | guessed alignment e.g. from type alignment. */ | 266 | guessed alignment e.g. from type alignment. |
77 | 267 | |||
78 | 268 | Note that the address (and thus the alignment) computed here is based | ||
79 | 269 | on the address to which a symbol resolves, whereas DECL_ALIGN is based | ||
80 | 270 | on the address at which an object is actually located. These two | ||
81 | 271 | addresses are not always the same. For example, on ARM targets, | ||
82 | 272 | the address &foo of a Thumb function foo() has the lowest bit set, | ||
83 | 273 | whereas foo() itself starts on an even address. */ | ||
84 | 267 | 274 | ||
85 | 268 | int | 275 | int |
86 | 269 | get_object_alignment (tree exp, unsigned int align, unsigned int max_align) | 276 | get_object_alignment (tree exp, unsigned int align, unsigned int max_align) |
87 | @@ -327,7 +334,21 @@ | |||
88 | 327 | exp = DECL_INITIAL (exp); | 334 | exp = DECL_INITIAL (exp); |
89 | 328 | if (DECL_P (exp) | 335 | if (DECL_P (exp) |
90 | 329 | && TREE_CODE (exp) != LABEL_DECL) | 336 | && TREE_CODE (exp) != LABEL_DECL) |
92 | 330 | align = MIN (inner, DECL_ALIGN (exp)); | 337 | { |
93 | 338 | if (TREE_CODE (exp) == FUNCTION_DECL) | ||
94 | 339 | { | ||
95 | 340 | /* Function addresses can encode extra information besides their | ||
96 | 341 | alignment. However, if TARGET_PTRMEMFUNC_VBIT_LOCATION | ||
97 | 342 | allows the low bit to be used as a virtual bit, we know | ||
98 | 343 | that the address itself must be 2-byte aligned. */ | ||
99 | 344 | if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn) | ||
100 | 345 | align = 2 * BITS_PER_UNIT; | ||
101 | 346 | else | ||
102 | 347 | align = BITS_PER_UNIT; | ||
103 | 348 | } | ||
104 | 349 | else | ||
105 | 350 | align = MIN (inner, DECL_ALIGN (exp)); | ||
106 | 351 | } | ||
107 | 331 | #ifdef CONSTANT_ALIGNMENT | 352 | #ifdef CONSTANT_ALIGNMENT |
108 | 332 | else if (CONSTANT_CLASS_P (exp)) | 353 | else if (CONSTANT_CLASS_P (exp)) |
109 | 333 | align = MIN (inner, (unsigned)CONSTANT_ALIGNMENT (exp, align)); | 354 | align = MIN (inner, (unsigned)CONSTANT_ALIGNMENT (exp, align)); |
110 | 334 | 355 | ||
111 | === modified file 'gcc/fold-const.c' | |||
112 | --- gcc/fold-const.c 2011-05-05 14:28:53 +0000 | |||
113 | +++ gcc/fold-const.c 2011-07-04 10:20:08 +0000 | |||
114 | @@ -10030,15 +10030,10 @@ | |||
115 | 10030 | 0 <= N < M as is common. In general, the precise value of P is unknown. | 10030 | 0 <= N < M as is common. In general, the precise value of P is unknown. |
116 | 10031 | M is chosen as large as possible such that constant N can be determined. | 10031 | M is chosen as large as possible such that constant N can be determined. |
117 | 10032 | 10032 | ||
123 | 10033 | Returns M and sets *RESIDUE to N. | 10033 | Returns M and sets *RESIDUE to N. */ |
119 | 10034 | |||
120 | 10035 | If ALLOW_FUNC_ALIGN is true, do take functions' DECL_ALIGN_UNIT into | ||
121 | 10036 | account. This is not always possible due to PR 35705. | ||
122 | 10037 | */ | ||
124 | 10038 | 10034 | ||
125 | 10039 | static unsigned HOST_WIDE_INT | 10035 | static unsigned HOST_WIDE_INT |
128 | 10040 | get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue, | 10036 | get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue) |
127 | 10041 | bool allow_func_align) | ||
129 | 10042 | { | 10037 | { |
130 | 10043 | enum tree_code code; | 10038 | enum tree_code code; |
131 | 10044 | 10039 | ||
132 | @@ -10068,9 +10063,8 @@ | |||
133 | 10068 | } | 10063 | } |
134 | 10069 | } | 10064 | } |
135 | 10070 | 10065 | ||
139 | 10071 | if (DECL_P (expr) | 10066 | if (DECL_P (expr)) |
140 | 10072 | && (allow_func_align || TREE_CODE (expr) != FUNCTION_DECL)) | 10067 | return get_object_alignment (expr, BITS_PER_UNIT, ~0U) / BITS_PER_UNIT; |
138 | 10073 | return DECL_ALIGN_UNIT (expr); | ||
141 | 10074 | } | 10068 | } |
142 | 10075 | else if (code == POINTER_PLUS_EXPR) | 10069 | else if (code == POINTER_PLUS_EXPR) |
143 | 10076 | { | 10070 | { |
144 | @@ -10080,8 +10074,7 @@ | |||
145 | 10080 | 10074 | ||
146 | 10081 | op0 = TREE_OPERAND (expr, 0); | 10075 | op0 = TREE_OPERAND (expr, 0); |
147 | 10082 | STRIP_NOPS (op0); | 10076 | STRIP_NOPS (op0); |
150 | 10083 | modulus = get_pointer_modulus_and_residue (op0, residue, | 10077 | modulus = get_pointer_modulus_and_residue (op0, residue); |
149 | 10084 | allow_func_align); | ||
151 | 10085 | 10078 | ||
152 | 10086 | op1 = TREE_OPERAND (expr, 1); | 10079 | op1 = TREE_OPERAND (expr, 1); |
153 | 10087 | STRIP_NOPS (op1); | 10080 | STRIP_NOPS (op1); |
154 | @@ -11801,8 +11794,7 @@ | |||
155 | 11801 | unsigned HOST_WIDE_INT modulus, residue; | 11794 | unsigned HOST_WIDE_INT modulus, residue; |
156 | 11802 | unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (arg1); | 11795 | unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (arg1); |
157 | 11803 | 11796 | ||
160 | 11804 | modulus = get_pointer_modulus_and_residue (arg0, &residue, | 11797 | modulus = get_pointer_modulus_and_residue (arg0, &residue); |
159 | 11805 | integer_onep (arg1)); | ||
161 | 11806 | 11798 | ||
162 | 11807 | /* This works because modulus is a power of 2. If this weren't the | 11799 | /* This works because modulus is a power of 2. If this weren't the |
163 | 11808 | case, we'd have to replace it by its greatest power-of-2 | 11800 | case, we'd have to replace it by its greatest power-of-2 |
164 | 11809 | 11801 | ||
165 | === added file 'gcc/testsuite/gcc.dg/torture/pr49169.c' | |||
166 | --- gcc/testsuite/gcc.dg/torture/pr49169.c 1970-01-01 00:00:00 +0000 | |||
167 | +++ gcc/testsuite/gcc.dg/torture/pr49169.c 2011-07-04 10:20:08 +0000 | |||
168 | @@ -0,0 +1,15 @@ | |||
169 | 1 | /* { dg-do compile { target { arm*-*-* || mips*-*-* } } } */ | ||
170 | 2 | |||
171 | 3 | #include <stdlib.h> | ||
172 | 4 | #include <stdint.h> | ||
173 | 5 | |||
174 | 6 | int | ||
175 | 7 | main (void) | ||
176 | 8 | { | ||
177 | 9 | void *p = main; | ||
178 | 10 | if ((intptr_t) p & 1) | ||
179 | 11 | abort (); | ||
180 | 12 | return 0; | ||
181 | 13 | } | ||
182 | 14 | |||
183 | 15 | /* { dg-final { scan-assembler "abort" } } */ |
cbuild has taken a snapshot of this branch at r99486 and queued it for build.
The snapshot is available at: ex.seabright. co.nz/snapshots /gcc-linaro- 4.5+bzr99486~ rsandifo~ lp721531- 4.5.tar. xdelta3. xz
http://
and will be built on the following builders:
a9-builder armv5-builder i686 x86_64
You can track the build queue at: ex.seabright. co.nz/helpers/ scheduler
http://
cbuild-snapshot: gcc-linaro- 4.5+bzr99486~ rsandifo~ lp721531- 4.5
cbuild-ancestor: lp:gcc-linaro+bzr99485
cbuild-state: check