[SVE] Eliminate bad VectorType::getNumElements() calls from ConstantFold
authorChristopher Tetreault <ctetreau@quicinc.com>
Wed, 17 Jun 2020 21:12:48 +0000 (14:12 -0700)
committerChristopher Tetreault <ctetreau@quicinc.com>
Wed, 17 Jun 2020 21:19:56 +0000 (14:19 -0700)
commit8819202dfd2c39a7ed4dd69f0d7e0e0bcf409e2a
tree2c275202e95256455642dadaf6bf8e2ee7043f90
parent4b776a98f1a425e264545b5c2abeff9e83a6f947
[SVE] Eliminate bad VectorType::getNumElements() calls from ConstantFold

Summary:
Assume all usages of this function are explicitly fixed-width operations
and cast to FixedVectorType

Reviewers: efriedma, sdesmalen, c-rhodes, majnemer, dblaikie

Reviewed By: sdesmalen

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80262
llvm/lib/IR/ConstantFold.cpp
llvm/test/Analysis/ConstantFolding/extractelement-vscale.ll [new file with mode: 0644]