The implementation just extends the vector to a larger element type, and extracts from that. Not fancy, but generates reasonable code.
While I'm here, fix warning from computeKnown bits.
efriedma on Sep 14 2020, 4:18 PM.Authored by
Rebase and clang-format.
I looked into handling this in LegalizeVectorOps, but that doesn't really work out: we actually legalize EXTRACT_VECTOR_ELT nodes in LegalizeDAG. And I don't want to do this in LegalizeDAG: LegalizeDAG can't handle arbitrary illegal vector operations.
There might be some way to sort out this mess, but it isn't trivial.