[PATCH] D86078: [AArch64] Improved lowering for saturating float to int.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 30 08:54:56 PDT 2020


nikic added a comment.

In D86078#2235475 <https://reviews.llvm.org/D86078#2235475>, @ebevhan wrote:

> In D86078#2233560 <https://reviews.llvm.org/D86078#2233560>, @paulwalker-arm wrote:
>
>> Given you are making use of the fact that AArch64 fp_to_int already does the saturation part, I'm wondering if the different-width saturation can be moved from the input to the output?  Specially I'm thinking this will result in nicer code as the min/max immediate values will be easier to produce in integer form.
>
> Ah, so you mean to emit the select-comparisons as integer comparisons rather than floating point comparisons in the second expansion.
>
> It feels like that would work. @nikic, was there any reason in particular you didn't implement it that way in the original patch or does it sound fine to you?

Sounds like a good idea to me. Don't think I had a particular reason here beyond "that's what the generic expansion does".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86078



More information about the llvm-commits mailing list