[all-commits] [llvm/llvm-project] e32522: [SLPVectorizer] Do not assume extracelement idx is...

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Feb 18 09:19:36 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e32522ca178acc42e26f21d64ef8fc180ad772bd
      https://github.com/llvm/llvm-project/commit/e32522ca178acc42e26f21d64ef8fc180ad772bd
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/X86/lookahead.ll

  Log Message:
  -----------
  [SLPVectorizer] Do not assume extracelement idx is a ConstantInt.

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.

Reviewers: RKSimon, ABataev, dtemirbulatov, vporpo

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D74758




More information about the All-commits mailing list