[PATCH] D46637: [TTI] Add uniform/non-uniform constant Pow2 detection to TargetTransformInfo::getInstructionThroughput

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 21 10:37:36 PDT 2018


RKSimon added a comment.

In https://reviews.llvm.org/D46637#1106605, @spatel wrote:

> Is it possible to show a vectorizer before/after with this change? I worry that we risk losing the motivating case if we only have CostModel regression tests instead of actual IR diffs.


Vectorizers tend to call getArithmeticInstrCost directly and don't pass through TargetTransformInfo::getInstructionThroughput/getInstructionCost - this patch is about improvements to the CostModel analysis pass to show that x86 is now aware of non-uniform pow2 SDIV special cases.

There is equivalent code in both Loopvectorize/SLPVectorizer that currently only recognise uniform power of 2 constants - I can fix these in future patches that should demonstrate IR diffs.


Repository:
  rL LLVM

https://reviews.llvm.org/D46637





More information about the llvm-commits mailing list