[VectorComine] Restrict single-element-store index to inbounds constant
authorQiu Chaofan <qiucofan@cn.ibm.com>
Wed, 12 May 2021 05:18:20 +0000 (13:18 +0800)
committerQiu Chaofan <qiucofan@cn.ibm.com>
Wed, 12 May 2021 05:18:20 +0000 (13:18 +0800)
commit6d2df181638a34f5d4ebc0c92cfb6a30abf8588d
tree3d4f82347cfec57a06970c7e03ed4ec84a258291
parent5dad3d1ba9ad01152be21e94cfbbfb31659ea3e1
[VectorComine] Restrict single-element-store index to inbounds constant

Vector single element update optimization is landed in 2db4979. But the
scope needs restriction. This patch restricts the index to inbounds and
vector must be fixed sized. In future, we may use value tracking to
relax constant restrictions.

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D102146
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
llvm/test/Transforms/VectorCombine/load-insert-store.ll