https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87047

--- Comment #8 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #7)
> Treating the missing else cost as 0 cost isn't right either, it is ok to
> accept some small cost, otherwise we wouldn't do the if conversion ever with
> missing else_bb.
> The thing is that it needs to be small enough.
> Do we need some new target magic constant for this, or do we just use cost
> of a few (say 4-5) moves or something similar?

Well, original_costs is already initialized with COSTS_N_INSNS (2), accounting
for test and branch that would be removed. So it's not too bad: in pr78120.c
else_bb is in fact missing.

(on x86 I think we shouldn't encourage if-conversion, by adding data
dependencies it can lengthen critical paths)

Reply via email to