History log of /llvm-project/llvm/test/Transforms/InstCombine/fsqrtdiv-transform.ll (Results 1 – 2 of 2)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 3b3590aa 17-Jan-2025 Sushant Gokhale <sgokhale@nvidia.com>

Revert "Revert "[InstCombine] Transform high latency, dependent FSQRT/FDIV into FMUL"" (#123313)

Reverts llvm/llvm-project#123289


# 7253c6fd 17-Jan-2025 Sushant Gokhale <sgokhale@nvidia.com>

[InstCombine] Transform high latency, dependent FSQRT/FDIV into FMUL (#87474)

The proposed patch, in general, tries to transform the below code
sequence:
x = 1.0 / sqrt (a);
r1 = x * x; // same

[InstCombine] Transform high latency, dependent FSQRT/FDIV into FMUL (#87474)

The proposed patch, in general, tries to transform the below code
sequence:
x = 1.0 / sqrt (a);
r1 = x * x; // same as 1.0 / a
r2 = a / sqrt(a); // same as sqrt (a)

TO

(If x, r1 and r2 are all used further in the code)
r1 = 1.0 / a
r2 = sqrt (a)
x = r1 * r2

The transform tries to make high latency sqrt and div operations
independent and also saves on one multiplication.

The patch was tested with SPEC17 suite with cpu=neoverse-v2. The
performance uplift achieved was:
544.nab_r ~4%

No other regressions were observed. Also, no compile time differences
were observed with the patch.

Closes #54652

show more ...