[LV] Remove scalable constraints on creating bitcasts
authorGraham Hunter <graham.hunter@arm.com>
Thu, 16 Mar 2023 13:48:45 +0000 (13:48 +0000)
committerGraham Hunter <graham.hunter@arm.com>
Fri, 17 Mar 2023 16:19:33 +0000 (16:19 +0000)
commit9aa01c4e8917569a7557fe05b278fc0892c9b56a
treef0c7b37bc12c3a0176778f6c54b70d5f94391af9
parent807d397c751355ae02a89cb5178192752b832203
[LV] Remove scalable constraints on creating bitcasts

InnerLoopVectorizer::createBitOrPointerCast only supported fixed
length vectors since it hadn't been updated. Supporting scalable
vectors is just a matter of changing types and using elementcount
instead of numelements, since there's nothing which actually relies
on knowing the exact length of the vector.

Original written by mgabka.

Split out from D145163.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp