HomePhabricator

[LFTR] Use recomputed BE count

Description

[LFTR] Use recomputed BE count

This was discussed as part of D62880. The basic thought is that computing BE taken count after widening should produce (on average) an equally good backedge taken count as the one before widening. Since there's only one test in the suite which is impacted by this change, and it's essentially equivelent codegen, that seems to be a reasonable assertion. This change was separated from r362971 so that if this turns out to be problematic, the triggering piece is obvious and easily revertable.

For the nestedIV example from elim-extend.ll, we end up with the following BE counts:
BEFORE: (-2 + (-1 * %innercount) + %limit)
AFTER: (-1 + (sext i32 (-1 + %limit) to i64) + (-1 * (sext i32 %innercount to i64))<nsw>)

Note that before is an i32 type, and the after is an i64. Truncating the i64 produces the i32.

Details

Committed
reamesJun 10 2019, 12:18 PM
Parents
rL362974: [PowerPC][HTM]Fix $zero is not a GPRC register for builtin_ttest
Branches
Unknown
Tags
Unknown