gcc

[armel, neon] ICE in reload_cse_simplify_operands, at postreload.c:402

Bug #744884 reported by Rafał Krypa
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro GCC
Triaged
Medium
Unassigned
gcc
Unknown
Unknown
gcc-4.5-armel-cross (Ubuntu)
New
Undecided
Unassigned

Bug Description

Compilation with options "-c -mfloat-abi=softfp -mfpu=neon -O2" of the following code:

#include <arm_neon.h>

void test(int16_t *output)
{
 int16x4_t a, b;
 int16x4x4_t z;
 z.val[0] = vadd_s16(a, b);
 z.val[1] = vadd_s16(a, b);
 z.val[2] = vsub_s16(a, b);
 z.val[3] = vadd_s16(a, b);

 vst4_lane_s16(&output[0], z, 0);
 vst4_lane_s16(&output[8], z, 1);
}

Causes ICE:

insn-unsat-constr.c: In function ‘test’:
insn-unsat-constr.c:7:21: warning: ‘a’ is used uninitialized in this function
insn-unsat-constr.c:7:21: warning: ‘b’ is used uninitialized in this function
insn-unsat-constr.c:14:1: error: insn does not satisfy its constraints:
(insn 34 13 18 2 /usr/lib/gcc/arm-linux-gnueabi/4.5.2/include/arm_neon.h:10277 (set (reg:OI 95 d16 [orig:147 __b ] [147])
        (mem/s/c:OI (pre_dec:SI (reg/f:SI 3 r3 [146])) [3 __b+0 S32 A64])) 739 {*neon_movoi} (expr_list:REG_INC (reg/f:SI 3 r3 [146])
        (nil)))
insn-unsat-constr.c:14:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:402

The error doesn't occur when optimization is turned off (-O0).

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: gcc-4.5-arm-linux-gnueabi 4.5.2-3ubuntu3cross1.46
ProcVersionSignature:

Uname: Linux 2.6.37-iceberg1 x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Tue Mar 29 12:37:50 2011
InstallationMedia: Mythbuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
SourcePackage: gcc-4.5-armel-cross

Revision history for this message
Rafał Krypa (r.krypa) wrote :
Revision history for this message
Ira Rosen (irar) wrote : AUTO: Ira Rosen is out of the office. (returning 17/04/2011)

I am out of the office until 17/04/2011.

Note: This is an automated response to your message "[Bug 744884] Re:
[armel, neon] ICE in reload_cse_simplify_operands, at postreload.c:402"
sent on 15/4/2011 3:15:49.

This is the only notification you will receive while this person is away.

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

Confirmed in gcc-linaro-4.5+bzr99492:

michaelh@ursa1:~/linaro/bugs$ ../toolchains/gcc-linaro-4.5+bzr99492-armv7l-maverick-cbuild108-ursa3-cortexa9r1/bin/gcc -O2 -mfpu=neon -S insn-unsat-constr.i
insn-unsat-constr.c: In function 'test':
insn-unsat-constr.c:19:1: error: insn does not satisfy its constraints:
(insn 41 22 27 2 /usr/lib/gcc/arm-linux-gnueabi/4.5.2/include/arm_neon.h:10277 (set (reg:OI 95 d16 [orig:154 __b ] [154])
        (mem/s/c:OI (pre_dec:SI (reg/f:SI 3 r3 [153])) [5 __b+0 S32 A64])) 786 {*neon_movoi} (expr_list:REG_INC (reg/f:SI 3 r3 [153])
        (nil)))
insn-unsat-constr.c:19:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:402

Also occurs on the GCC 4.5 release branch:

michaelh@ursa1:~/linaro/bugs$ /tools/toolchains/gcc-4.5.2-armv7l-maverick-cbuild93-ursa1-cortexa8r1/bin/gcc -O2 -mfpu=neon -S insn-unsat-constr.i
insn-unsat-constr.c: In function 'test':
insn-unsat-constr.c:19:1: error: insn does not satisfy its constraints:
(insn 41 22 27 2 /usr/lib/gcc/arm-linux-gnueabi/4.5.2/include/arm_neon.h:10277 (set (reg:OI 95 d16 [orig:154 __b ] [154])
        (mem/s/c:OI (pre_dec:SI (reg/f:SI 3 r3 [153])) [5 __b+0 S32 A64])) 731 {*neon_movoi} (expr_list:REG_INC (reg/f:SI 3 r3 [153])
        (nil)))
insn-unsat-constr.c:19:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:396

Does not occur in the GCC 4.6.0 release:

michaelh@ursa1:~/linaro/bugs$ /tools/toolchains/gcc-4.6.0-armv7l-maverick-cbuild93-ursa1-cortexa8r1/bin/gcc -O2 -mfpu=neon -S insn-unsat-constr.i

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

Could you please also log a ticket in GCC bugzilla as this problem also occurs on the 4.5 branch?

Changed in gcc-linaro:
importance: Undecided → Medium
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.