Skip to content
Commit a0fe9e05 authored by Florian Hahn's avatar Florian Hahn Committed by Hans Wennborg
Browse files

[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

(cherry picked from commit e32522ca)
parent be45a5a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment