HomePhabricator

[InstSimplify] Add constant fold for extractelement + splat for scalable vectors

Authored by CarolineConcatto on May 11 2021, 7:22 AM.

Description

[InstSimplify] Add constant fold for extractelement + splat for scalable vectors

This patch allows that scalable vector can fold extractelement and constant splat
only when the lane index is lower than the minimum number of elements of the vector.

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