[SimplifyInst] Use correct type for GEPs with vector indices.
The current code does not properly handle vector indices unless they are the first index. At the moment LangRef gives the impression that the vector index must be the one and only index (https://llvm.org/docs/LangRef.html#getelementptr-instruction). But vector indices can appear at any position and according to the verifier there may be multiple vector indices. If that's the case, the number of elements must match. This patch updates SimplifyGEPInst to properly handle those additional cases. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D99961
Loading
Please sign in to comment