[PATCH] D114779: [LV][X86] Sink `LoopVectorizationCostModel::useEmulatedMaskMemRefHack()` further into TTI, disable for X86/AVX2+

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 1 13:16:35 PST 2021


lebedev.ri added subscribers: twoh, tejohnson, davidxl, mtrofin.
lebedev.ri added a comment.

Ok, so i'm looking at those optsize.ll/tripcount.ll tests, and i'm not sure what exactly they are testing.
They don't specify the triple/attributes, so what costs do they expect to get?

I **think** what was happening is that they relied on the fact that opt doesn't default to -march=native
and for no machine there is a support for masked gather/scatter/load/store for those types (i8) in baseline ISA,
so `useEmulatedMaskMemRefHack()` hack would always happen and the instructions(and thus the vectorization cost)
would be bogusly high, and that would prevent them from vectorizing?

I'm not really sure what to do about them. Is my analysis wrong?
Can perhaps someone familiar with those tests comment?

tripcount.ll was added in D32451 <https://reviews.llvm.org/D32451> and modified in D42946 <https://reviews.llvm.org/D42946>;
cc @twoh, @tejohnson, @davidxl, @mtrofin, @yamauchi


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114779



More information about the llvm-commits mailing list