2016-09-20 Uros Bizjak <ubiz...@gmail.com> * config/i386/i386.md (mult->ashift peephole2s): Use pow2p_hwi instead of exact_log2.
Bootstrapped and regression tested on x86_64-linux-gnu {,-m32} , committed to mainline SVN. Uros.
Index: config/i386/i386.md =================================================================== --- config/i386/i386.md (revision 240276) +++ config/i386/i386.md (working copy) @@ -18304,7 +18304,7 @@ [(set (match_operand:SWI48 0 "register_operand") (mult:SWI48 (match_dup 0) (match_operand:SWI48 1 "const_int_operand")))] - "exact_log2 (INTVAL (operands[1])) >= 0 + "pow2p_hwi (INTVAL (operands[1])) && peep2_regno_dead_p (0, FLAGS_REG)" [(parallel [(set (match_dup 0) (ashift:SWI48 (match_dup 0) (match_dup 1))) (clobber (reg:CC FLAGS_REG))])] @@ -18316,7 +18316,7 @@ (mult:SI (match_operand:SI 1 "register_operand") (match_operand:SI 2 "const_int_operand"))))] "TARGET_64BIT - && exact_log2 (INTVAL (operands[2])) >= 0 + && pow2p_hwi (INTVAL (operands[2])) && REGNO (operands[0]) == REGNO (operands[1]) && peep2_regno_dead_p (0, FLAGS_REG)" [(parallel [(set (match_dup 0)