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. Another solution I'd thought about involved accepting the mode with the predicate, but FAILing in the expander. 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. But certainly preventing a generic crash in prepare_operand is good regardless of whatever else happens in the backend. r~