[PATCH] D154953: [InstSimplify] Remove the remainder loop if we know the mask is always true

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 00:18:59 PDT 2023


Allen marked 2 inline comments as done.
Allen added a comment.

It seems the alive2 doesn't support the semantics of vscale, https://github.com/AliveToolkit/alive2/issues/923

In D154953#4519341 <https://reviews.llvm.org/D154953#4519341>, @goldstein.w.n wrote:

> In D154953#4518239 <https://reviews.llvm.org/D154953#4518239>, @Allen wrote:
>
>> I don't add alive2 because vscale is not supported, https://github.com/AliveToolkit/alive2/issues/923
>
> The patch doesn't rely on alive2, just on the power of 2 nature of the arguments.
> You can use: https://alive2.llvm.org/ce/z/FkTMoy + adding the srem versions.

The case in the link can't be optimized with this patch because we can't infer the operands of urem is power-of-two with isKnownToBeAPowerOfTwo now, so I'll try it with a separate patch


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

https://reviews.llvm.org/D154953



More information about the llvm-commits mailing list