[PATCH] D129852: [AArch64][SVE] Sink op into loop if it's used by PTEST and known to zero inactive lanes.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 03:03:51 PDT 2022


sdesmalen added a comment.

In D129852#3655395 <https://reviews.llvm.org/D129852#3655395>, @sdesmalen wrote:

> In D129852#3655364 <https://reviews.llvm.org/D129852#3655364>, @paulwalker-arm wrote:
>
>> Can you provide a C/C++ example for when this is a problem? I'm not saying there's no problem to solve but rather that I'm starting to wonder if early decisions about removing reinterpret intrinsics are now starting to bite us.
>
> https://godbolt.org/z/q6hKMsxKK
>
> In this case it doesn't have anything to do with the reinterpret intrinsics, but rather the `ptrue` that gets hoisted out which is then no longer visible to (non-Global) ISel when it lowers the `ptest`.

Just to expand on this a little bit, I experimented with disabling the removal of the reinterpret intrinsics, but found that the `convert.to.svbool` call is still outside the loop at the point of reaching codegen, meaning that it still can't fold away the ptest instruction unless it actively tries to sink the operand.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129852



More information about the llvm-commits mailing list