Commit 6fad471b by Ulrich Weigand Committed by Ulrich Weigand

optabs.c (prepare_operand): Gracefully fail if the mode of X does not match the…

optabs.c (prepare_operand): Gracefully fail if the mode of X does not match the operand mode expected by...

	* optabs.c (prepare_operand): Gracefully fail if the mode of X
	does not match the operand mode expected by the insn pattern.

From-SVN: r217501
parent d64ae614
2014-11-13 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* optabs.c (prepare_operand): Gracefully fail if the mode of X
does not match the operand mode expected by the insn pattern.
2014-11-13 Richard Biener <rguenther@suse.de> 2014-11-13 Richard Biener <rguenther@suse.de>
* match.pd: Add tcc_comparison, inverted_tcc_comparison * match.pd: Add tcc_comparison, inverted_tcc_comparison
...@@ -4308,9 +4308,12 @@ prepare_operand (enum insn_code icode, rtx x, int opnum, machine_mode mode, ...@@ -4308,9 +4308,12 @@ prepare_operand (enum insn_code icode, rtx x, int opnum, machine_mode mode,
if (!insn_operand_matches (icode, opnum, x)) if (!insn_operand_matches (icode, opnum, x))
{ {
machine_mode op_mode = insn_data[(int) icode].operand[opnum].mode;
if (reload_completed) if (reload_completed)
return NULL_RTX; return NULL_RTX;
x = copy_to_mode_reg (insn_data[(int) icode].operand[opnum].mode, x); if (GET_MODE (x) != op_mode && GET_MODE (x) != VOIDmode)
return NULL_RTX;
x = copy_to_mode_reg (op_mode, x);
} }
return x; return x;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment