[all-commits] [llvm/llvm-project] dedf01: [LoongArch] lower SCALAR_TO_VECTOR to INSERT_VECTO...
tangaac via All-commits
all-commits at lists.llvm.org
Wed Jan 22 01:28:15 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dedf014901cecd7ba3bbc1aadb17098a5a95b8a7
https://github.com/llvm/llvm-project/commit/dedf014901cecd7ba3bbc1aadb17098a5a95b8a7
Author: tangaac <tangyan01 at loongson.cn>
Date: 2025-01-22 (Wed, 22 Jan 2025)
Changed paths:
M llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
M llvm/lib/Target/LoongArch/LoongArchISelLowering.h
M llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
M llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
A llvm/test/CodeGen/LoongArch/lasx/scalar-to-vector.ll
M llvm/test/CodeGen/LoongArch/lsx/build-vector.ll
A llvm/test/CodeGen/LoongArch/lsx/scalar-to-vector.ll
M llvm/test/CodeGen/LoongArch/vector-fp-imm.ll
Log Message:
-----------
[LoongArch] lower SCALAR_TO_VECTOR to INSERT_VECTOR_ELT (#122863)
```llvm
define <16 x i8> @scalar_to_16xi8(i8 %val) {
%ret = insertelement <16 x i8> undef, i8 %val, i32 0
ret <16 x i8> %ret
}
```
before
```asm
addi.d $sp, $sp, -16
st.b $a0, $sp, 0
vld $vr0, $sp, 0
addi.d $sp, $sp, 16
ret
```
after
```asm
vinsgr2vr.b $vr0, $a0, 0
ret
```
---------
Co-authored-by: Lu Weining <luweining at loongson.cn>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list