[PATCH] D154953: [InstCombine] Remove the reminder loop if we know the mask is always true

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 09:05:13 PDT 2023


paulwalker-arm added a comment.

@nikic What's the rational for not being allow to use TTI during instcombine? TTI is used for target specific combines.

I don't like the idea of having to decorate every function with information that is essentially constant for the target.  Changing the LangRef seems like a backward step given LLVM already supports non-power-of-two values of `vscale`, which will be much harder to re-add once lost.  That said, if no target supports non-power-of-two values of `vscale` then I'll not fight to keep such support if that's the consensus.

As a halfway house, what if we changed the definition of vscale_range to imply vscale is power-of-two.  Sure that's still a loss of functionality but it's smaller and critically maintains the path for supporting arbitrary vscale values whilst ensuring existing targets can encode the power-of-two-ness within the IR without needing any code changes.


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

https://reviews.llvm.org/D154953



More information about the llvm-commits mailing list