From ed34fc9723afa86bcb50d2372d8941687d39213c Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Tue, 20 Sep 2016 20:00:46 +0200 Subject: [PATCH] i386.md (mult->ashift peephole2s): Use pow2p_hwi instead of exact_log2. * config/i386/i386.md (mult->ashift peephole2s): Use pow2p_hwi instead of exact_log2. From-SVN: r240281 --- gcc/ChangeLog | 10 ++++++++-- gcc/config/i386/i386.md | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e92ad3866e4..c7f108013e3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-09-20 Uros Bizjak + + * config/i386/i386.md (mult->ashift peephole2s): Use pow2p_hwi + instead of exact_log2. + 2016-09-20 Uros Bizjak PR target/77621 @@ -346,7 +351,8 @@ 2016-09-14 Pat Haugen - * loop-unroll.c (unroll_loop_runtime_iterations): Set probability of succ edge. + * loop-unroll.c (unroll_loop_runtime_iterations): Set probability + of succ edge. 2016-09-14 Segher Boessenkool @@ -446,7 +452,7 @@ 2016-09-13 Tamar Christina - * config/aarch64/aarch64-builtins.c + * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins): Fix builtin type signature printing. 2016-09-13 Uros Bizjak diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index e3c9eadde85..6337a5db523 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -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) -- 2.30.2