On Thu, Nov 13, 2014 at 7:57 PM, Ulrich Weigand <uweig...@de.ibm.com> wrote: > Richard Henderson wrote: >> On 11/12/2014 09:41 PM, Ulrich Weigand wrote: >> > * optabs.c (prepare_operand): Gracefully fail if the mode of X >> > does not match the operand mode expected by the insn pattern. >> >> This is ok. > > I've checked this in now, thanks. > >> I wondered whether s390 benefit from following i386 in allowing >> mov<>cc to accept immediate operands pre-reload. This could then >> be re-used by cstorecc4 to allow any CC mode to expand to LOCR >> when available. > > Well, we already compile > > int test (long x, long y) > { > return x < y; > } > > to > > cgr %r2,%r3 # 44 *cmpdi_ccs/1 [length = 4] > lhi %r1,0 # 43 *movsi_zarch/1 [length = 4] > lhi %r2,1 # 7 *movsi_zarch/1 [length = 4] > locrnl %r2,%r1 # 45 *movsicc/2 [length = 4] > lgfr %r2,%r2 # 17 *extendsidi2/1 [length = 4] > br %r14 # 50 return [length = 2] > > with -march=z196 or higher. The LOCR is not introduced via > cstorecc4, but instead directly by noce_emit_cmove via > emit_conditional_move. It doesn't seem to matter that the > patterns don't accept immediate operands; those are loaded > into registers by maybe_legitimize_operand, which already > tries a copy_to_mode_reg.
This probably caused bootstrap on s390x-linux to fail as in PR63952 (last checked with rev. 217714). Richard. > Bye, > Ulrich > > -- > Dr. Ulrich Weigand > GNU/Linux compilers and toolchain > ulrich.weig...@de.ibm.com >