[PATCH] D100684: [X86][CostModel] X86TTIImpl::getMemoryOpCost(): rewrite vector handling again
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 13 13:09:11 PDT 2021
fhahn added inline comments.
================
Comment at: llvm/lib/Target/X86/X86TargetTransformInfo.cpp:3273
+ const int EltTyBits = DL.getTypeSizeInBits(EltTy);
+ assert(((EltTyBits > 0) && (EltTyBits % 8 == 0)) &&
+ "Expected byte-size types");
----------------
etyurin wrote:
> fhahn wrote:
> > This assert triggers if a vector of `i1` (e.g. `<16 x i1>`) is passed. `EltTyBits` will be `1`.
> >
> > The assert can be triggered by running `opt -cost-model -analyze -mtriple=x86_64-unknown-linux-gnu` on
> > ```
> > define void @foo(<16 x i1> %v, <16 x i1>* %ptr) {
> > store <16 x i1> %v, <16 x i1>* %ptr
> > ret void
> > }
> > ```
> >
> > See https://llvm.godbolt.org/z/jxPvdGEW4 for a run-able version.
> >
> >
> >
> >
> Perhaps, DL.getTypeStoreSizeInBits should be used instead of getTypeSizeInBits.
I'm not sure. If it takes longer to resolve it might be good to revert it in the meantime.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100684/new/
https://reviews.llvm.org/D100684
More information about the llvm-commits
mailing list