[PATCH] D98243: [LV] Account for the cost of predication of scalarized load/store

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 06:57:14 PDT 2021


SjoerdMeijer accepted this revision.
SjoerdMeijer added a comment.
This revision is now accepted and ready to land.

This looks very reasonable to me.

PS Nothing wrong with a descriptive function name: `useEmulatedMaskMemRefHack`:-)



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6781
+    Cost += TTI.getScalarizationOverhead(
+        Vec_i1Ty, APInt::getAllOnesValue(VF.getKnownMinValue()), false, true);
+    Cost += TTI.getCFInstrCost(Instruction::Br, TTI::TCK_RecipThroughput);
----------------
Nit: I see there's precedent of not doing it in this file, but 

  .., false /* Insert */, true /* Extract */);

would have helped readability for me.


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

https://reviews.llvm.org/D98243



More information about the llvm-commits mailing list