Skip to content

Commit a19ddff

Browse files
committed
[LoongArch] Pre-commit test for fixing xvshuf instructions. NFC
For this test, the `xvshuf.d` instruction should not be generated. This will be fixed later.
1 parent 30de98c commit a19ddff

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2+
; RUN: llc --mtriple=loongarch64 --mattr=+lasx %s -o - | FileCheck %s
3+
4+
;; Fix https://github.com/llvm/llvm-project/issues/137000.
5+
6+
define <4 x double> @shufflevector_v4f64(<4 x double> %a, <4 x double> %b) {
7+
; CHECK-LABEL: shufflevector_v4f64:
8+
; CHECK: # %bb.0: # %entry
9+
; CHECK-NEXT: pcalau12i $a0, %pc_hi20(.LCPI0_0)
10+
; CHECK-NEXT: xvld $xr2, $a0, %pc_lo12(.LCPI0_0)
11+
; CHECK-NEXT: xvshuf.d $xr2, $xr1, $xr0
12+
; CHECK-NEXT: xvori.b $xr0, $xr2, 0
13+
; CHECK-NEXT: ret
14+
entry:
15+
%c = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> <i32 0, i32 6, i32 3, i32 7>
16+
ret <4 x double> %c
17+
}

0 commit comments

Comments
 (0)