Commit 46346d8d authored by Robin Dapp's avatar Robin Dapp
Browse files

ifcvt: Improve costs handling for noce_convert_multiple.

When noce_convert_multiple is called the original costs are not yet
initialized.  Therefore, up to now, costs were only ever unfairly
compared against COSTS_N_INSNS (2).  This would lead to
default_noce_conversion_profitable_p () rejecting all but the most
contrived of sequences.

This patch temporarily initializes the original costs by counting
adding costs for all sets inside the then_bb.

gcc/ChangeLog:

	* ifcvt.cc (bb_ok_for_noce_convert_multiple_sets): Estimate insns costs.
	(noce_process_if_block): Use potential costs.
parent 9b8eaa28
Supports Markdown
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