[PATCH] D74758: [SLPVectorizer] Do not assume extracelement idx is a ConstantInt.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 18 03:17:34 PST 2020


fhahn created this revision.
fhahn added reviewers: RKSimon, ABataev, dtemirbulatov, vporpo.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

The index of an ExtractElementInst is not guaranteed to be a
ConstantInt. It can be any integer value. Check explicitly for
ConstantInts.

The new test cases illustrate scenarios where we crash without
this patch. I've also added another test case to check the matching
of extractelement vector ops works.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74758

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/X86/lookahead.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74758.245117.patch
Type: text/x-patch
Size: 10262 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200218/432d3827/attachment.bin>


More information about the llvm-commits mailing list