Merge lp:~rsandifo/gcc-linaro/lp721531-4.5 into lp:gcc-linaro/4.5

Proposed by Richard Sandiford
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
Reviewer Review Type Date Requested Status
Linaro Toolchain Developers Pending
Review via email: mp+66279@code.launchpad.net

This proposal supersedes a proposal from 2011-06-27.

This proposal has been superseded by a proposal from 2011-07-04.

Description of the change

Include fix for x86_64 regressions.

To post a comment you must log in.
Revision history for this message
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal

cbuild has taken a snapshot of this branch at r99486 and queued it for build.

The snapshot is available at:
 http://ex.seabright.co.nz/snapshots/gcc-linaro-4.5+bzr99486~rsandifo~lp721531-4.5.tar.xdelta3.xz

and will be built on the following builders:
 a9-builder armv5-builder i686 x86_64

You can track the build queue at:
 http://ex.seabright.co.nz/helpers/scheduler

cbuild-snapshot: gcc-linaro-4.5+bzr99486~rsandifo~lp721531-4.5
cbuild-ancestor: lp:gcc-linaro+bzr99485
cbuild-state: check

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal

cbuild successfully built this on i686-lucid-cbuild137-scorpius-i686r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99486~rsandifo~lp721531-4.5/logs/i686-lucid-cbuild137-scorpius-i686r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99485:
 +PASS: gcc.dg/torture/pr49169.c -O0 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O1 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 -flto (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 -fwhopr (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O3 -fomit-frame-pointer (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O3 -g (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -Os (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 -PASS: g++.dg/tree-ssa/fwprop-align.C scan-tree-dump-times forwprop2 "& 1" 0
 +FAIL: g++.dg/tree-ssa/fwprop-align.C scan-tree-dump-times forwprop2 "& 1" 0

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99486~rsandifo~lp721531-4.5/logs/i686-lucid-cbuild137-scorpius-i686r1/gcc-testsuite.txt

cbuild-checked: i686-lucid-cbuild137-scorpius-i686r1

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote : Posted in a previous version of this proposal

cbuild successfully built this on x86_64-natty-cbuild136-crucis-x86_64r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99486~rsandifo~lp721531-4.5/logs/x86_64-natty-cbuild136-crucis-x86_64r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99485:
 +PASS: gcc.dg/torture/pr49169.c -O0 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O1 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 -flto (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 -fwhopr (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O2 (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O3 -fomit-frame-pointer (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -O3 -g (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c -Os (test for excess errors)
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 +PASS: gcc.dg/torture/pr49169.c scan-assembler abort
 -PASS: g++.dg/tree-ssa/fwprop-align.C scan-tree-dump-times forwprop2 "& 1" 0
 +FAIL: g++.dg/tree-ssa/fwprop-align.C scan-tree-dump-times forwprop2 "& 1" 0

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99486~rsandifo~lp721531-4.5/logs/x86_64-natty-cbuild136-crucis-x86_64r1/gcc-testsuite.txt

cbuild-checked: x86_64-natty-cbuild136-crucis-x86_64r1

Revision history for this message
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://ex.seabright.co.nz/snapshots/gcc-linaro-4.5+bzr99487~rsandifo~lp721531-4.5.tar.xdelta3.xz

and will be built on the following builders:
 a9-builder armv5-builder i686 x86_64

You can track the build queue at:
 http://ex.seabright.co.nz/helpers/scheduler

cbuild-snapshot: gcc-linaro-4.5+bzr99487~rsandifo~lp721531-4.5
cbuild-ancestor: lp:gcc-linaro+bzr99485
cbuild-state: check

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild successfully built this on i686-lucid-cbuild142-scorpius-i686r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99487~rsandifo~lp721531-4.5/logs/i686-lucid-cbuild142-scorpius-i686r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99485:
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O0
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O1
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2 -flto
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2 -fwhopr
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O3 -fomit-frame-pointer
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O3 -g
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -Os

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99487~rsandifo~lp721531-4.5/logs/i686-lucid-cbuild142-scorpius-i686r1/gcc-testsuite.txt

cbuild-checked: i686-lucid-cbuild142-scorpius-i686r1

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild successfully built this on x86_64-natty-cbuild144-oort1-x86_64r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99487~rsandifo~lp721531-4.5/logs/x86_64-natty-cbuild144-oort1-x86_64r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99485:
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O0
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O1
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2 -flto
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O2 -fwhopr
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O3 -fomit-frame-pointer
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -O3 -g
 +UNSUPPORTED: gcc.dg/torture/pr49169.c -Os

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99487~rsandifo~lp721531-4.5/logs/x86_64-natty-cbuild144-oort1-x86_64r1/gcc-testsuite.txt

cbuild-checked: x86_64-natty-cbuild144-oort1-x86_64r1

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild successfully built this on armv7l-natty-cbuild144-ursa4-armv5r2.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99487~rsandifo~lp721531-4.5/logs/armv7l-natty-cbuild144-ursa4-armv5r2

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://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99487~rsandifo~lp721531-4.5/logs/armv7l-natty-cbuild144-ursa4-armv5r2/gcc-testsuite.txt

cbuild-checked: armv7l-natty-cbuild144-ursa4-armv5r2

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog.linaro'
--- ChangeLog.linaro 2011-07-01 11:24:39 +0000
+++ ChangeLog.linaro 2011-07-04 10:20:08 +0000
@@ -1,3 +1,4 @@
1<<<<<<< TREE
12011-07-01 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>22011-07-01 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
23
3 Backport from mainline.4 Backport from mainline.
@@ -525,6 +526,57 @@
525 * function.c (prepare_shrink_wrap): New function.526 * function.c (prepare_shrink_wrap): New function.
526 (thread_prologue_and_epilogue_insns): Call it.527 (thread_prologue_and_epilogue_insns): Call it.
527528
529=======
5302011-07-04 Richard Sandiford <rdsandiford@googlemail.com>
531
532 gcc/
533 * builtins.c (get_object_alignment): Fix comment.
534 * fold-const.c (get_pointer_modulus_and_residue): Remove
535 allow_func_align. Use get_object_alignment.
536 (fold_binary_loc): Update caller.
537
5382011-06-29 Richard Sandiford <rdsandiford@googlemail.com>
539
540 gcc/
541 Backport from mainline:
542
543 2011-06-29 Richard Sandiford <richard.sandiford@linaro.org>
544
545 PR tree-optimization/49545
546 * builtins.c (get_object_alignment_1): Update function comment.
547 Do not use DECL_ALIGN for functions, but test
548 TARGET_PTRMEMFUNC_VBIT_LOCATION instead.
549 * fold-const.c (get_pointer_modulus_and_residue): Don't check
550 for functions here.
551
552 gcc/testsuite/
553 Backport from mainline:
554
555 2011-06-29 Richard Sandiford <richard.sandiford@linaro.org>
556
557 * gcc.dg/torture/pr49169.c: Restrict to ARM and MIPS targets.
558
5592011-06-27 Richard Sandiford <richard.sandiford@linaro.org>
560
561 gcc/
562 Backport from mainline:
563
564 2011-07-27 Richard Guenther <rguenther@suse.de>
565
566 PR tree-optimization/49169
567 * fold-const.c (get_pointer_modulus_and_residue): Don't rely on
568 the alignment of function decls.
569
570 gcc/testsuite/
571 Backport from mainline:
572
573 2011-07-27 Michael Hope <michael.hope@linaro.org>
574 Richard Sandiford <richard.sandiford@linaro.org>
575
576 PR tree-optimization/49169
577 * gcc.dg/torture/pr49169.c: New test.
578
579>>>>>>> MERGE-SOURCE
5282011-03-03 Andrew Stubbs <ams@codesourcery.com>5802011-03-03 Andrew Stubbs <ams@codesourcery.com>
529581
530 gcc/582 gcc/
531583
=== modified file 'gcc/builtins.c'
--- gcc/builtins.c 2011-01-06 11:02:44 +0000
+++ gcc/builtins.c 2011-07-04 10:20:08 +0000
@@ -263,7 +263,14 @@
263263
264/* Return the alignment in bits of EXP, an object.264/* Return the alignment in bits of EXP, an object.
265 Don't return more than MAX_ALIGN no matter what, ALIGN is the inital265 Don't return more than MAX_ALIGN no matter what, ALIGN is the inital
266 guessed alignment e.g. from type alignment. */266 guessed alignment e.g. from type alignment.
267
268 Note that the address (and thus the alignment) computed here is based
269 on the address to which a symbol resolves, whereas DECL_ALIGN is based
270 on the address at which an object is actually located. These two
271 addresses are not always the same. For example, on ARM targets,
272 the address &foo of a Thumb function foo() has the lowest bit set,
273 whereas foo() itself starts on an even address. */
267274
268int275int
269get_object_alignment (tree exp, unsigned int align, unsigned int max_align)276get_object_alignment (tree exp, unsigned int align, unsigned int max_align)
@@ -327,7 +334,21 @@
327 exp = DECL_INITIAL (exp);334 exp = DECL_INITIAL (exp);
328 if (DECL_P (exp)335 if (DECL_P (exp)
329 && TREE_CODE (exp) != LABEL_DECL)336 && TREE_CODE (exp) != LABEL_DECL)
330 align = MIN (inner, DECL_ALIGN (exp));337 {
338 if (TREE_CODE (exp) == FUNCTION_DECL)
339 {
340 /* Function addresses can encode extra information besides their
341 alignment. However, if TARGET_PTRMEMFUNC_VBIT_LOCATION
342 allows the low bit to be used as a virtual bit, we know
343 that the address itself must be 2-byte aligned. */
344 if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn)
345 align = 2 * BITS_PER_UNIT;
346 else
347 align = BITS_PER_UNIT;
348 }
349 else
350 align = MIN (inner, DECL_ALIGN (exp));
351 }
331#ifdef CONSTANT_ALIGNMENT352#ifdef CONSTANT_ALIGNMENT
332 else if (CONSTANT_CLASS_P (exp))353 else if (CONSTANT_CLASS_P (exp))
333 align = MIN (inner, (unsigned)CONSTANT_ALIGNMENT (exp, align));354 align = MIN (inner, (unsigned)CONSTANT_ALIGNMENT (exp, align));
334355
=== modified file 'gcc/fold-const.c'
--- gcc/fold-const.c 2011-05-05 14:28:53 +0000
+++ gcc/fold-const.c 2011-07-04 10:20:08 +0000
@@ -10030,15 +10030,10 @@
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.
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.
1003210032
10033 Returns M and sets *RESIDUE to N.10033 Returns M and sets *RESIDUE to N. */
10034
10035 If ALLOW_FUNC_ALIGN is true, do take functions' DECL_ALIGN_UNIT into
10036 account. This is not always possible due to PR 35705.
10037 */
1003810034
10039static unsigned HOST_WIDE_INT10035static unsigned HOST_WIDE_INT
10040get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue,10036get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue)
10041 bool allow_func_align)
10042{10037{
10043 enum tree_code code;10038 enum tree_code code;
1004410039
@@ -10068,9 +10063,8 @@
10068 }10063 }
10069 }10064 }
1007010065
10071 if (DECL_P (expr)10066 if (DECL_P (expr))
10072 && (allow_func_align || TREE_CODE (expr) != FUNCTION_DECL))10067 return get_object_alignment (expr, BITS_PER_UNIT, ~0U) / BITS_PER_UNIT;
10073 return DECL_ALIGN_UNIT (expr);
10074 }10068 }
10075 else if (code == POINTER_PLUS_EXPR)10069 else if (code == POINTER_PLUS_EXPR)
10076 {10070 {
@@ -10080,8 +10074,7 @@
1008010074
10081 op0 = TREE_OPERAND (expr, 0);10075 op0 = TREE_OPERAND (expr, 0);
10082 STRIP_NOPS (op0);10076 STRIP_NOPS (op0);
10083 modulus = get_pointer_modulus_and_residue (op0, residue,10077 modulus = get_pointer_modulus_and_residue (op0, residue);
10084 allow_func_align);
1008510078
10086 op1 = TREE_OPERAND (expr, 1);10079 op1 = TREE_OPERAND (expr, 1);
10087 STRIP_NOPS (op1);10080 STRIP_NOPS (op1);
@@ -11801,8 +11794,7 @@
11801 unsigned HOST_WIDE_INT modulus, residue;11794 unsigned HOST_WIDE_INT modulus, residue;
11802 unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (arg1);11795 unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (arg1);
1180311796
11804 modulus = get_pointer_modulus_and_residue (arg0, &residue,11797 modulus = get_pointer_modulus_and_residue (arg0, &residue);
11805 integer_onep (arg1));
1180611798
11807 /* This works because modulus is a power of 2. If this weren't the11799 /* This works because modulus is a power of 2. If this weren't the
11808 case, we'd have to replace it by its greatest power-of-211800 case, we'd have to replace it by its greatest power-of-2
1180911801
=== added file 'gcc/testsuite/gcc.dg/torture/pr49169.c'
--- gcc/testsuite/gcc.dg/torture/pr49169.c 1970-01-01 00:00:00 +0000
+++ gcc/testsuite/gcc.dg/torture/pr49169.c 2011-07-04 10:20:08 +0000
@@ -0,0 +1,15 @@
1/* { dg-do compile { target { arm*-*-* || mips*-*-* } } } */
2
3#include <stdlib.h>
4#include <stdint.h>
5
6int
7main (void)
8{
9 void *p = main;
10 if ((intptr_t) p & 1)
11 abort ();
12 return 0;
13}
14
15/* { dg-final { scan-assembler "abort" } } */

Subscribers

People subscribed via source and target branches