[PATCH] D126692: [InstCombine] Expand select+masked_load combine to include FP splats of -0.0

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 31 05:40:24 PDT 2022


david-arm added a comment.

In D126692#3547065 <https://reviews.llvm.org/D126692#3547065>, @nikic wrote:

> In D126692#3547061 <https://reviews.llvm.org/D126692#3547061>, @david-arm wrote:
>
>> In D126692#3547055 <https://reviews.llvm.org/D126692#3547055>, @nikic wrote:
>>
>>> Can this be based on nsz FMF instead?
>>
>> I was hoping to do that originally, but I think that select instructions do not have any fast math flags attached?
>
> Selects (and phis) do support FMF nowadays.

OK. The loop vectoriser is kicking out selects that don't have any FMF and there is no other pass afterwards that adds them. So I guess an alternative would be to automatically add FMF flags to all select instructions even though it's actually a bitwise operation? If that's acceptable to everyone of course.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126692



More information about the llvm-commits mailing list