[PATCH] D137811: InstCombine: Perform basic isnan combines on llvm.is.fpclass

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 19 06:47:33 PST 2023


kpn added a comment.

> In D137811#4063200 <https://reviews.llvm.org/D137811#4063200>, @kpn wrote:
>
>> In D137811#4063159 <https://reviews.llvm.org/D137811#4063159>, @efriedma wrote:
>>
>>>> inlining may require conversion to a form that uses constrained intrinsics
>>>
>>> Functions which are not strictfp are allowed to introduce "spurious" fp flag writes; for example, we can flatten control flow that contains floating-point ops.  Inlining the function doesn't change that general rule.  The inliner converts fp operations just to ensure that later optimizations don't move those operations around.
>>
>> I didn't think we had code in the tree to convert normal FP instructions into constrained intrinsics. Andy Kaylor had a ticket with code to do this, but I didn't think it ever went in. Where is this code used by the inliner?
>
> Here it is: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Utils/CloneFunction.cpp#L390

Ah, excellent. I misremembered. Thanks for the correction!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137811/new/

https://reviews.llvm.org/D137811



More information about the llvm-commits mailing list