[PATCH] D110076: [AMDGPU][GlobalISel] Code quality: Combine V_RSQ
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 4 04:48:00 PDT 2021
foad added a comment.
> Added implementation for all possible cases which should be combined into rsq (rcp(sqrt(x)), sqrt(rcp(x)), 1/sqrt(x), sqrt(1/x)).
I thought this would be two separate combines:
1. (1.0 / x) -> (rcp x)
2. (sqrt (rcp x)) or (rcp (sqrt x)) -> (rsq x)
Is there some reason we don't implement the first combine, e.g. because of the precision of the rcp instruction is not good enough? What does SelectionDAG do?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110076/new/
https://reviews.llvm.org/D110076
More information about the llvm-commits
mailing list