HomePhabricator

[DAGCombiner] skip reciprocal divisor optimization for x/sqrt(x)

Authored by spatel on Aug 30 2020, 7:51 AM.

Description

[DAGCombiner] skip reciprocal divisor optimization for x/sqrt(x)

In general, we probably want to try the multi-use reciprocal
transform before sqrt transforms, but x/sqrt(x) is a special-case
because that will always reduce to plain sqrt(x) or an estimate.

The AArch64 tests show that the transform is limited by TLI
hook to patterns where there are 3 or more uses of the divisor.
So this change can result in an extra division compared to
what we had, but that's the intended behvior based on the
current setting of that hook.

Details

Committed
spatelAug 30 2020, 7:55 AM
Parents
rG7692cb1a6fd1: [AArch64] add tests for multi-use fast sqrt/recip; NFC
Branches
Unknown
Tags
Unknown