diff options
author | Huihui Zhang <huihuiz@quicinc.com> | 2020-05-07 12:43:14 -0700 |
---|---|---|
committer | Huihui Zhang <huihuiz@quicinc.com> | 2020-05-07 12:44:52 -0700 |
commit | 08c9c13749aebd03bec55442301442670fa0b72c (patch) | |
tree | aded81bb630e926f6d27a1740a569155daff027b /clang/lib/Basic/IdentifierTable.cpp | |
parent | 5eae715a3115be2640d0fd37d0bd4771abf2ab9b (diff) | |
download | llvm-08c9c13749aebd03bec55442301442670fa0b72c.zip llvm-08c9c13749aebd03bec55442301442670fa0b72c.tar.gz llvm-08c9c13749aebd03bec55442301442670fa0b72c.tar.bz2 |
[InstCombine][SVE] Fix visitInsertElementInst for scalable type.
Summary:
This patch fixes the following issues in visitInsertElementInst:
1. Bail out for scalable type when analysis requires fixed size number of vector elements.
2. Use cast<FixedVectorType> to get vector number of elements. This ensure assertion
on scalable vector type.
3. For scalable type, avoid folding a chain of insertelement into splat:
insertelt(insertelt(insertelt(insertelt X, %k, 0), %k, 1), %k, 2) ...
->
shufflevector(insertelt(X, %k, 0), undef, zero)
The length of scalable vector is unknown at compile-time, therefore we don't know if
given insertelement sequence is valid for splat.
Reviewers: sdesmalen, efriedma, spatel, nikic
Reviewed By: sdesmalen, efriedma
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78895
Diffstat (limited to 'clang/lib/Basic/IdentifierTable.cpp')
0 files changed, 0 insertions, 0 deletions