[PATCH] D34141: [X86] Recognize constant arrays with special values and replace loads from it with subtract and shift instructions, which then may be replaced by BZHI machine instruction.

Elena Demikhovsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 06:04:49 PDT 2017


delena added a comment.

In https://reviews.llvm.org/D34141#786514, @RKSimon wrote:

> While I don't want to end up forcing you to over-engineer this, it seems this pass is currently very specific and should be generalised to make it straightforward to work for constants arrays of other patterns that are easily re-materializable (upper/lower masks, single bit masks, etc.) - "SubstituteLoadWithRematerializationPass", possibly driven by the TTI cost models?


I agree that the name of the pass should be more generic. 
Do you mean renaming by "generalization" ? Or you propose to add this transformation for all targets and ask TTI about profitability of this transformation?


https://reviews.llvm.org/D34141





More information about the llvm-commits mailing list