[PATCH] D86726: [InstCombine]: Transform 1.0/sqrt(X) * X to X/sqrt(X) and X * 1.0/sqrt(X) to X/sqrt(X)
Venkataramanan Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 02:25:29 PDT 2020
venkataramanan.kumar.llvm added a comment.
Folding is not happening when the number of uses for the divide operand (say 1.0/something) is more than one.
The test case I added is same as below
ref: https://godbolt.org/z/xKh1n1
here 1/sqrt(x) is used more than once and the folding is not happening.
As I said this patch does not have the usage restriction and folds the particular case of x *1/sqrt(x) to x/sqrt(x) and later we will optimize the divide away to sqrt(x).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86726/new/
https://reviews.llvm.org/D86726
More information about the llvm-commits
mailing list