[InstSimplify][SVE] Fix SimplifyInsert/ExtractElementInst for scalable vector.
authorHuihui Zhang <huihuiz@quicinc.com>
Wed, 11 Mar 2020 22:09:01 +0000 (15:09 -0700)
committerHuihui Zhang <huihuiz@quicinc.com>
Wed, 11 Mar 2020 22:09:56 +0000 (15:09 -0700)
commit8f525739622d1a478f774d7bd9d336cc1013d04b
tree41ce61516bf8d3b77829d16ac246a7bcf685c162
parent828fe7916f91fb7aed5e711bfeb1a30ad197a2c3
[InstSimplify][SVE] Fix SimplifyInsert/ExtractElementInst for scalable vector.

Summary:
For scalable vector, index out-of-bound can not be determined at compile-time.
The same apply for VectorUtil findScalarElement().

Add test cases to check the functionality of SimplifyInsert/ExtractElementInst for scalable vector.

Reviewers: sdesmalen, efriedma, spatel, apazos

Reviewed By: efriedma

Subscribers: cameron.mcinally, tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75782
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/lib/Analysis/VectorUtils.cpp
llvm/test/Transforms/InstSimplify/vscale.ll [new file with mode: 0644]