Hello! Attached patch removes now unneeded call to recog in ix86_legitimate_combined_insn.
Thanks Alan for his guidance! 2017-01-15 Uros Bizjak <ubiz...@gmail.com> * config/i386/i386.c (ix86_legitimate_combined_insn): Do not call recog here. Assert that INSN_CODE (insn) is non-negative. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Committed to mainline SVN. Uros.
Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 244472) +++ config/i386/i386.c (working copy) @@ -8125,15 +8125,16 @@ ix86_return_pops_args (tree fundecl, tree funtype, static bool ix86_legitimate_combined_insn (rtx_insn *insn) { + int i; + /* Check operand constraints in case hard registers were propagated into insn pattern. This check prevents combine pass from generating insn patterns with invalid hard register operands. These invalid insns can eventually confuse reload to error out with a spill failure. See also PRs 46829 and 46843. */ - if ((INSN_CODE (insn) = recog (PATTERN (insn), insn, 0)) >= 0) - { - int i; + gcc_assert (INSN_CODE (insn) >= 0); + extract_insn (insn); preprocess_constraints (insn); @@ -8192,7 +8193,6 @@ ix86_legitimate_combined_insn (rtx_insn *insn) if (!win) return false; } - } return true; }