Bug 750852 - Fedora 16 Alpha: Internal compiler error in VMX build test
Fedora 16 Alpha: Internal compiler error in VMX build test
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
ppc64 All
unspecified Severity urgent
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks: F17Betappc
  Show dependency treegraph
Reported: 2011-11-02 10:51 EDT by IBM Bug Proxy
Modified: 2012-05-07 09:40 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-27 11:38:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Backport of Andreas' two patches (4.35 KB, text/plain)
2012-03-09 12:11 EST, IBM Bug Proxy
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
IBM Linux Technology Center 76328 None None None Never

  None (edit)
Description IBM Bug Proxy 2011-11-02 10:51:08 EDT
I did a VMX test using existing test package and when doing the build it gave the following compiling errors:

[root@c57f1ju0203 testVMX-0.2.2]# make gcc
gcc -O3 -m32 -mcpu=970 -mtune=970 -maltivec -mabi=altivec -ffast-math -finline-functions -frerun-loop-opt -frerun-cse-after-loop -DALTIVEC -DGCC_COMPILER  -x c -o testVMX-gcc-32 testVMX.c memoryVector.c -lm
g++ -O3 -m32 -mcpu=970 -mtune=970 -maltivec -mabi=altivec -ffast-math -finline-functions -frerun-loop-opt -frerun-cse-after-loop -DALTIVEC -DGCC_COMPILER  -x c++ -o testVMX-g++-32 testVMX.c memoryVector.c -lm
gcc -O3 -m64 -mcpu=970 -mtune=970 -maltivec -mabi=altivec -ffast-math -finline-functions -frerun-loop-opt -frerun-cse-after-loop -DALTIVEC -DGCC_COMPILER  -x c -o testVMX-gcc-64 testVMX.c memoryVector.c -lm
testVMX.c: In function ??part3??:
testVMX.c:5340:1: error: insn does not satisfy its constraints:
(insn 38767 19596 38766 2202 (set (reg:V4SI 6 6)
        (const_vector:V4SI [
                (const_int 15 [0xf])
                (const_int 15 [0xf])
                (const_int 15 [0xf])
                (const_int 15 [0xf])
            ])) testVMX.c:4485 1000 {*altivec_movv4si}
testVMX.c:5340:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403
Please submit a full bug report,
with preprocessed source if appropriate.

== Comment:  2011.11.02 00:38:29 ==
Cut down testcase:

#include <altivec.h>

typedef union
	vector unsigned int v;
	unsigned int e[4];
} bar;

int testcase()
	int a = 1, b, i;
	vector unsigned int c = (vector unsigned int){1, 1, 1, 1};
	vector unsigned int d = (vector unsigned int){1, 2, 1, 2};
	bar c_u, d_u;

	c_u.v = c;
	d_u.v = d;

	b = vec_all_le(c_u.v, d_u.v);

	for (i=0; i < 4; i++)
		a += (c_u.e[i] <= d_u.e[i]);

	if (b != a)
		return 1;

	return 0;

== Comment:  2011.11.02 00:39:28 ==
Fails on FC16:

gcc version 4.6.1 20111003 (Red Hat 4.6.1-10) (GCC) 

# gcc -Wall -O3 -m64 -maltivec -c foo3.c
foo3.c: In function ???testcase???:
foo3.c:28:1: error: insn does not satisfy its constraints:
(insn 69 7 68 2 (set (reg:V4SI 10 10)
        (const_vector:V4SI [
                (const_int 1 [0x1])
                (const_int 1 [0x1])
                (const_int 1 [0x1])
                (const_int 1 [0x1])
            ])) foo3.c:16 1000 {*altivec_movv4si}
foo3.c:28:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403

Alan tells me it passes on mainline:

gcc (GCC) 4.7.0 20111028 (experimental)
Comment 1 IBM Bug Proxy 2011-11-02 10:51:23 EDT
------- Comment From bergner@vnet.ibm.com 2011-11-02 10:50 EDT-------
This is the same bug Bill reported in the GCC bugzilla:


Although Anton's reduced test case is much smaller than Bill's largish Fortran test case :)

Obviously, doing a VMX load into an integer register is not a good thing.

I'm a little hesitant to say this is FIXEDAWAITINGTEST until we've identified why this passed on mainline.  It may be that is is fixed there, or we could just be getting lucky and the bug is still present, but latent.
Comment 2 Aravind vijayan 2011-11-08 10:17:25 EST

Fedora Bugzappers volunteer triage team
Comment 3 Jakub Jelinek 2011-11-10 05:04:20 EST
Can you bisect it which trunk commit made it go away?  Then we can figure out if it is a fix for that or just some unrelated change that made the bug go latent?
Comment 4 IBM Bug Proxy 2011-11-10 15:12:42 EST
------- Comment From bergner@vnet.ibm.com 2011-11-10 15:03 EDT-------
Pat Haugen is kicking off a bisect to identify the revision that fixes it.
Comment 5 IBM Bug Proxy 2011-11-11 11:00:37 EST
------- Comment From pthaugen@us.ibm.com 2011-11-11 10:52 EDT-------
This started working on trunk with revision 171413.

2011-03-24  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* reload.c (find_reloads_subreg_address): Add address_reloaded
parameter and return true there if the full address has been
(find_reloads_toplev): Pass address_reloaded flag.
(find_reloads_address_1): Don't use address_reloaded parameter.
Comment 6 IBM Bug Proxy 2011-11-11 11:40:33 EST
------- Comment From bergner@vnet.ibm.com 2011-11-11 11:38 EDT-------
Identified patch was submitted upstream here:

Comment 7 IBM Bug Proxy 2011-11-15 13:00:22 EST
------- Comment From bergner@vnet.ibm.com 2011-11-15 12:58 EDT-------
At the top of the web page I pointed you to, you should see the following:

Other format: 	[Raw text]

Click on the "Raw Text" link and you can save that page as your patch.
Comment 8 IBM Bug Proxy 2011-11-28 18:20:24 EST
------- Comment From clnperez@us.ibm.com 2011-11-28 18:12 EDT-------
[Making external]

> Ok,with the gcc patch rebuilt I redid the testVMX test and this time it passed.
> Thanks a lot!
Comment 9 IBM Bug Proxy 2011-11-30 14:21:25 EST
------- Comment From baude@us.ibm.com 2011-11-30 14:15 EDT-------
@Fedora, we have confirmed the patch that Berger points at resolves the defect.  Would you consider pulling this patch into gcc?
Comment 10 Peter Bergner 2012-02-03 11:08:10 EST
Jakub, is there any chance Andreas' fix will get picked up for the next update?
Comment 11 IBM Bug Proxy 2012-02-17 14:00:21 EST
------- Comment From bergner@vnet.ibm.com 2012-02-17 13:55 EDT-------
Still waiting for a reply from Red Hat.
Comment 12 IBM Bug Proxy 2012-03-09 12:11:13 EST
------- Comment From bergner@vnet.ibm.com 2012-03-09 12:02 EDT-------
FYI, here is the request for the upstream backport:

Comment 13 IBM Bug Proxy 2012-03-09 12:11:26 EST
Created attachment 568962 [details]
Backport of Andreas' two patches

------- Comment on attachment From bergner@vnet.ibm.com 2012-03-09 12:00 EDT-------

I'm attaching the backport of Andreas' patches we want picked up in Fedora 16.  I'll also note that I have asked upstream that these be applied to the FSF 4.5 and 4.6 branches where this bug also exists.  If it's easier to commit them there and them merge the F16 source with upstream, that's fine with me to.

        PR target/50181
        Backported from mainline

        2012-01-20  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

        PR rtl-optimization/51856
        * reload.c (find_reloads_subreg_address): Set the address_reloaded
        flag to reloaded.

        2011-03-24  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

        * reload.c (find_reloads_subreg_address): Add address_reloaded
        parameter and return true there if the full address has been
        (find_reloads_toplev): Pass address_reloaded flag.
        (find_reloads_address_1): Don't use address_reloaded parameter.

        2012-01-20  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

        * gcc.c-torture/compile/pr51856.c: New testcase.
Comment 15 IBM Bug Proxy 2012-05-07 08:00:56 EDT
------- Comment From maheshhi@in.ibm.com 2012-05-07 11:57 EDT-------
I Verified this on Fedora 17 alpha PPC64 and we did not get any compilation errors and all tests
are passed.
Looks like It is fixed now with F17 alpha PPC64.

Here is the output:

g++ -O3 -m64 -mcpu=970 -mtune=970 -maltivec -mabi=altivec -ffast-math -finline-functions -frerun-loop-opt -frerun-cse-after-loop -DALTIVEC -DGCC_COMPILER  -x c++ -o testVMX-g++-64 testVMX.c memoryVector.c -lm

---uname -a ---
Linux c57f1ju0203.ppd.pok.ibm.com 3.3.4-1.fc17.ppc64 #1 SMP Tue May 1 12:48:10 MST 2012 ppc64 ppc64 ppc64 GNU/Linux

[root@c57f1ju0203 glibc-2.15-a316c1f]# gcc --version
gcc (GCC) 4.7.0 20120416 (Red Hat 4.7.0-2)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO


Note You need to log in before you can comment on or make changes to this bug.