Merge lp:~linaro-toolchain-dev/gcc-linaro/fix-pr51301-4.6 into lp:gcc-linaro/4.6

Proposed by Ira Rosen
Status: Merged
Merge reported by: Ira Rosen
Merged at revision: not available
Proposed branch: lp:~linaro-toolchain-dev/gcc-linaro/fix-pr51301-4.6
Merge into: lp:gcc-linaro/4.6
To merge this branch: bzr merge lp:~linaro-toolchain-dev/gcc-linaro/fix-pr51301-4.6
Reviewer Review Type Date Requested Status
Linaro Toolchain Developers Pending
Review via email: mp+83987@code.launchpad.net

Description of the change

Backport from mainline: fix pr 51301 - a bug in over-promotion pattern.

To post a comment you must log in.
Revision history for this message
Michael Hope (michaelh1) wrote :

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

The diff against the ancestor r106845 is available at:
 http://builds.linaro.org/toolchain/snapshots/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6.diff

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.6+bzr106846~irar~fix-pr51301-4.6
cbuild-ancestor: lp:gcc-linaro+bzr106845
cbuild-state: check

Revision history for this message
Michael Hope (michaelh1) wrote :

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

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/x86_64-natty-cbuild209-oort1-x86_64r1

+PASS: gcc.dg/vect/pr51301.c (test for excess errors)
+PASS: gcc.dg/vect/pr51301.c -flto (test for excess errors)

The full diff is at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/x86_64-natty-cbuild209-oort1-x86_64r1/testsuite-diff.txt

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/x86_64-natty-cbuild209-oort1-x86_64r1/gcc-testsuite.txt

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

Revision history for this message
Michael Hope (michaelh1) wrote :

cbuild successfully built this on i686-natty-cbuild209-oort2-i686r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/i686-natty-cbuild209-oort2-i686r1

+PASS: gcc.dg/vect/pr51301.c (test for excess errors)
+PASS: gcc.dg/vect/pr51301.c -flto (test for excess errors)

The full diff is at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/i686-natty-cbuild209-oort2-i686r1/testsuite-diff.txt

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/i686-natty-cbuild209-oort2-i686r1/gcc-testsuite.txt

cbuild-checked: i686-natty-cbuild209-oort2-i686r1

Revision history for this message
Michael Hope (michaelh1) wrote :

cbuild successfully built this on armv7l-natty-cbuild209-tcpanda03-cortexa9r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/armv7l-natty-cbuild209-tcpanda03-cortexa9r1

-PASS: g++.dg/cdce3.C execution test
+FAIL: g++.dg/cdce3.C execution test
+PASS: gcc.dg/vect/pr51301.c (test for excess errors)
+PASS: gcc.dg/vect/pr51301.c -flto (test for excess errors)

The full diff is at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/armv7l-natty-cbuild209-tcpanda03-cortexa9r1/testsuite-diff.txt

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/armv7l-natty-cbuild209-tcpanda03-cortexa9r1/gcc-testsuite.txt

cbuild-checked: armv7l-natty-cbuild209-tcpanda03-cortexa9r1

Revision history for this message
Michael Hope (michaelh1) wrote :

cbuild successfully built this on armv7l-natty-cbuild211-tcpanda05-armv5r2.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/armv7l-natty-cbuild211-tcpanda05-armv5r2

+PASS: gcc.dg/vect/pr51301.c (test for excess errors)
+PASS: gcc.dg/vect/pr51301.c -flto (test for excess errors)

The full diff is at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/armv7l-natty-cbuild211-tcpanda05-armv5r2/testsuite-diff.txt

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/armv7l-natty-cbuild211-tcpanda05-armv5r2/gcc-testsuite.txt

cbuild-checked: armv7l-natty-cbuild211-tcpanda05-armv5r2

Revision history for this message
Ira Rosen (irar) wrote :

> -PASS: g++.dg/cdce3.C execution test
> +FAIL: g++.dg/cdce3.C execution test

This seems to be unrelated. Vectorization is not turned on for this test, here are its options:

/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -DGNU_EXTENSION -DLARGE_LONG_DOUBLE -lm" { target { pow10 && large_long_double } } } */
/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -DLARGE_LONG_DOUBLE -lm" { target { {! pow10 } && large_long_double } } } */
/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -DGNU_EXTENSION -lm" { target { pow10 && {! large_long_double } } } } */
/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" { target { {! pow10 } && {! large_long_double } } } } */

But even with vectorization on, nothing gets vectorized and there is nothing related to the over-promotion pattern.

Revision history for this message
Michael Hope (michaelh1) wrote :

I'm re-running the A9 build.

Revision history for this message
Michael Hope (michaelh1) wrote :

cbuild successfully built this on armv7l-natty-cbuild212-tcpanda06-cortexa9r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/armv7l-natty-cbuild212-tcpanda06-cortexa9r1

-PASS: g++.dg/cdce3.C execution test
+FAIL: g++.dg/cdce3.C execution test
+PASS: gcc.dg/vect/pr51301.c (test for excess errors)
+PASS: gcc.dg/vect/pr51301.c -flto (test for excess errors)

The full diff is at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/armv7l-natty-cbuild212-tcpanda06-cortexa9r1/testsuite-diff.txt

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6/logs/armv7l-natty-cbuild212-tcpanda06-cortexa9r1/gcc-testsuite.txt

cbuild-checked: armv7l-natty-cbuild212-tcpanda06-cortexa9r1

Revision history for this message
Michael Hope (michaelh1) wrote :

A second run on a different machine fails in the same way.

Revision history for this message
Ira Rosen (irar) wrote :

It still doesn't make sense to me. -O2 -fmath-errno just don't turn vectorization on.
I still can't see the diff here, so maybe I just did something stupid without noticing. I can start from the beginning, i.e., remove this proposal and submit a new one.

Revision history for this message
Ira Rosen (irar) wrote :

I rebuilt the branch with
--with-float=softfp --with-fpu=neon --with-arch=armv7-a --with-mode=thumb --with-tune=cortex-a9
to match the run.
I compiled (cross) and ran g++.dg/cdce3.C on ursa1 with different flags: with the flags from the testsuite and also with -O3 -ftree-vectorize. It didn't fail.

I finally managed to see the diff, and it looks ok.

Anyway, the patch doesn't change code generation. It can only prevent optimization, since it adds a check.

Revision history for this message
Michael Hope (michaelh1) wrote :

I grabbed the binary builds out of the build system and used them to compile cdce3.C:

cbuild@tcpanda02:~/tmp$ ./gcc-linaro-4.6+bzr106846~irar~fix-pr51301-4.6-armv7l-natty-cbuild212-tcpanda06-cortexa9r1/bin/g++ -O2 -fmath-errno -DGNU_EXTENSION -fdump-tree-cdce-details cdce3.C

The assembly is identical to the predecessor.

Subscribers

People subscribed via source and target branches