[LegalizeTypes][AArch64] Use scalar_to_vector to eliminate bitcast
authorzhongyunde <zhongyunde@huawei.com>
Wed, 14 Jun 2023 15:28:46 +0000 (23:28 +0800)
committerzhongyunde <zhongyunde@huawei.com>
Wed, 14 Jun 2023 15:33:02 +0000 (23:33 +0800)
commit43b2df03e842f109121ff60e6b62097b5a6c41ea
treeda260bf27689425ce1088e798d925f7ea140e0f6
parente108aee956e138bf8164c810b155b2a577726755
[LegalizeTypes][AArch64] Use scalar_to_vector to eliminate bitcast

```
Legalize t3: v2i16 = bitcast i32
with   (v2i16 extract_subvector (v4i16 bitcast (v2i32 scalar_to_vector (i32 in))), 0)
```
Fix https://github.com/llvm/llvm-project/issues/61638

NOTE: Don't touch getPreferredVectorAction like X86 as this will touch
too many test cases.

Reviewed By: dmgreen, paulwalker-arm, efriedma
Differential Revision: https://reviews.llvm.org/D147678
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/aarch64-load-ext.ll
llvm/test/CodeGen/AArch64/neon-bitcast.ll