[PATCH] D113291: [AggressiveInstCombine] Lower Table Based CTTZ and enable it for AARCH64 in -O3

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 07:43:49 PDT 2022


djtodoro added a comment.

In D113291#3539840 <https://reviews.llvm.org/D113291#3539840>, @dmgreen wrote:

> Hello - We were having a discussion about a very similar patch in D125755 <https://reviews.llvm.org/D125755>. I think the outcome for this patch is that either:
>
> - We need to do this later (maybe in CodeGenPrepare).

The initial version of patch was implemented within `CodeGenPrepare`. And I think it should not introduce any performance regression.

> - We need to do this unconditionally without the call to TTI.preferCTTZLowering() and have the reverse transform later for targets that do not have a cheaper alternative.

Hmm... I need to think about that.

> - We need to argue some more :)

Seems that I need to find some time to catch up the conversation in D125755 <https://reviews.llvm.org/D125755>. :)

> There are more details about why in D125755 <https://reviews.llvm.org/D125755>. I would go for the first option if it doesn't lead to worse performance, as for the second I'm not sure when it would be profitable to transform back and emit the table. You may not want to do that for non-hot ctzs?

I am not sure I get the question.


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

https://reviews.llvm.org/D113291



More information about the llvm-commits mailing list