[llvm] [LoongArch] use TypeWidenVector for most illegal vector types (PR #126456)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 25 22:11:49 PST 2025
================
@@ -0,0 +1,322 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc --mtriple=loongarch64 --mattr=+lsx %s -o - | FileCheck %s
+
+
+define void @load_sext_2i8_to_2i64(ptr%ptr, ptr%dst) {
----------------
tangaac wrote:
```llvm
define void @load_sext_2i8_to_2i64(ptr %ptr, ptr %dst) {
; CHECK-LABEL: load_sext_2i8_to_2i64:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: ld.h $a0, $a0, 0
; CHECK-NEXT: vinsgr2vr.h $vr0, $a0, 0
; CHECK-NEXT: vilvl.b $vr0, $vr0, $vr0
; CHECK-NEXT: vilvl.h $vr0, $vr0, $vr0
; CHECK-NEXT: vilvl.w $vr0, $vr0, $vr0
; CHECK-NEXT: vslli.d $vr0, $vr0, 56
; CHECK-NEXT: vsrai.d $vr0, $vr0, 56
; CHECK-NEXT: vst $vr0, $a1, 0
; CHECK-NEXT: ret
entry:
%A = load <2 x i8>, ptr %ptr
%B = sext <2 x i8> %A to <2 x i64>
store <2 x i64> %B, ptr %dst
ret void
}
```
https://github.com/llvm/llvm-project/pull/126456
More information about the llvm-commits
mailing list