Code review comment for lp:~uweigand/gcc-linaro/neon-extendsidi-4.7

Revision history for this message
Andrew Stubbs (ams-codesourcery) wrote :

The build failure is this:

../../../../gcc-linaro-4.7/libgfortran/io/write.c: In function 'extract_int':
../../../../gcc-linaro-4.7/libgfortran/io/write.c:466:1: error: insn does not satisfy its constraints:
(insn 20 19 21 4 (set (reg/v:DI 2 r2 [orig:134 i ] [134])
        (sign_extend:DI (mem:QI (reg:SI 3 r3) [0 MEM[(char * {ref-all})p_4(D)]+0 S1 A8]))) ../../../../gcc-linaro-4.7/libgfortran/io/write.c:428 156 {extendqidi2}
     (nil))
../../../../gcc-linaro-4.7/libgfortran/io/write.c:466:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

This appears to be caused by a latent bug: the extendqidi2 pattern (actually "extend<mode>di2") has a predicate that allows memory loads in both ARM and Thumb modes, but the constraints only permit mems in ARM mode. Presumably this hasn't been a problem before because a) when optimizing the pattern has always been split before register allocation (i.e. before the constraints really mean anything), and b) when not optimizing it's too stupid to do load and extend in one insn.

It didn't show up in my own test builds. This might be because I have a slightly different baseline, or it might be because I wasn't building fortran.

I can fix this by adding a proper alternative for thumb mode, I expect.

« Back to merge proposal