[PATCH] D153472: AMDGPU: Correctly expand f64 sqrt intrinsic

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 04:53:42 PDT 2023

arsenm added a comment.
Herald added a subscriber: wangpc.

In D153472#4443773 <https://reviews.llvm.org/D153472#4443773>, @Pierre-vh wrote:

>> I am tempted to do this in an IR expansion instead. In the IR
>> we could take advantage of computeKnownFPClass to avoid
>> the 0-or-inf argument check.
> Wouldn't this be a good fit for CGP, and avoid repeating logic for GISel+DAGISel?
> Is there a drawback to doing it in IR?

CGP is an optimization pass only. If we did IR expansion, we would break if anything later tried to introduce new sqrts for some reason. I don't like legality holes where we're hoping certain things don't happen after the expansion, so we'd need both



More information about the llvm-commits mailing list