On 11/23/2016 12:02 PM, Bernd Schmidt wrote:
On 11/23/2016 07:57 PM, Bernd Schmidt wrote:
3. ifcvt computes the sum of costs for the involved blocks, but only
makes a before/after comparison when optimizing for size. When
optimizing for speed, it uses max_seq_cost, which is an estimate
computed from BRANCH_COST, which in turn can be zero for predictable
branches on x86.
This is the final patch and has the testcase. It also happens to be the
least risky of the series so it could be applied on its own (without the
test).
Bernd
71280-3.diff
PR rtl-optimization/78120
* ifcvt.c (noce_conversion_profitable_p): Check original cost in all
cases, and additionally test against max_seq_cost for speed
optimization.
(noce_process_if_block): Compute an estimate for the original cost when
optimizing for speed, using the minimum of then and else block costs.
PR rtl-optimization/78120
* gcc.target/i386/pr78120.c: New test.
Also OK. Obviously Uros has the call on the x86 target change. Stage
the series in as you see fit given the dependencies.
jeff