http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55426
Bug #: 55426
Summary: gcc.target/arm/neon-vld1_dupQ.c ICEs on armeb
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Host: Scientific Linux 6.3
Target: arm big-endian
Build: Scientific Linux 6.3
Hi,
I have encountered a following ICE on arm big endian target
{{{
neon-vld1_dupQ.c: In function ‘main’:
neon-vld1_dupQ.c:24:1: error: unrecognizable insn:
(insn 94 93 31 (set (subreg:DI (reg:V2DI 95 d16 [orig:137 D.14400 ] [137]) 0)
(subreg:DI (reg:V2DI 95 d16 [orig:137 D.14400 ] [137]) 8))
/home/armbe/toolchain/armeb-tools/bin/../lib/gcc/armeb-none-linux-gnueabi/4.7.0/include/arm_neon.h:8214
-1
(nil))
neon-vld1_dupQ.c:24:1: internal compiler error: in extract_insn, at
recog.c:2123
Please submit a full bug report,
}}}
My initial investigation shows that the following patch (split insn)
http://gcc.gnu.org/ml/gcc-patches/2012-05/msg01131.html is causing
this failure.
I think the CANNOT_CHANGE_MODE_CLASS macro is present and also plays a
role in not allowing the mov of DImode in this case.
If I revert the patch then I do not encounter this problem.
I can propose a solution, which may fix this problem.
In case of little endian the compiler generates,
{{{
insn 93 26 94 (set (reg:DI 95 d16 [orig:137 D.14400 ] [137])
(vec_duplicate:DI (mem:DI (reg/f:SI 2 r2 [155]) [0 *(const
__builtin_neon_di[1] *) __a_5+0 S8 A64])))
/home/armbe/toolchain/arm-tools/bin/../lib/gcc/arm-montavista-linux-gnueabi/4.7.0/include/arm_neon.h:8214
1606 {neon_vld1_dupdi}
(nil))
vld1.64 {d16}, [r2:64] @ 93 neon_vld1_dupdi [length = 4]
(insn 94 93 31 (set (reg:DI 97 d17 [ D.14400+8 ])
(reg:DI 95 d16 [orig:137 D.14400 ] [137]))
/home/armbe/toolchain/arm-tools/bin/../lib/
}}}
But incase of big endian the vmov\t%f0, %e0 is missing there is no
pattern in the neon.md file.
Adding this may solve the problem. Something like this
(define_insn "*neon_subreg_di"
[(set (match_operand:DI 0 "s_register_operand" "=w")
(match_operand:DI 1 "s_register_operand" "w"))]
"TARGET_NEON"
"vmov\t%1, %0"
)
Kindly comment on this patch or could you please help me with the
pointers to solve this problem.
Regards,
Manjunath S Matti.