1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-- -mattr=+movrs,+avx10.2-512 -verify-machineinstrs --show-mc-encoding | FileCheck %s --check-prefixes=CHECK
4 declare <64 x i8> @llvm.x86.avx10.vmovrsb512(ptr)
5 declare <16 x i32> @llvm.x86.avx10.vmovrsd512(ptr)
6 declare <8 x i64> @llvm.x86.avx10.vmovrsq512(ptr)
7 declare <32 x i16> @llvm.x86.avx10.vmovrsw512(ptr)
9 define <8 x i64> @test_mm512_movrsb_epi8(ptr %__A) {
10 ; CHECK-LABEL: test_mm512_movrsb_epi8:
11 ; CHECK: # %bb.0: # %entry
12 ; CHECK-NEXT: vmovrsb (%rdi), %zmm0 # encoding: [0x62,0xf5,0x7f,0x48,0x6f,0x07]
13 ; CHECK-NEXT: retq # encoding: [0xc3]
15 %0 = tail call <64 x i8> @llvm.x86.avx10.vmovrsb512(ptr %__A)
16 %1 = bitcast <64 x i8> %0 to <8 x i64>
20 define <8 x i64> @test_mm512_mask_movrsb_epi8(<8 x i64> %__A, i64 %__B, ptr %__C) {
21 ; CHECK-LABEL: test_mm512_mask_movrsb_epi8:
22 ; CHECK: # %bb.0: # %entry
23 ; CHECK-NEXT: kmovq %rdi, %k1 # encoding: [0xc4,0xe1,0xfb,0x92,0xcf]
24 ; CHECK-NEXT: vmovrsb (%rsi), %zmm0 {%k1} # encoding: [0x62,0xf5,0x7f,0x49,0x6f,0x06]
25 ; CHECK-NEXT: retq # encoding: [0xc3]
27 %0 = tail call <64 x i8> @llvm.x86.avx10.vmovrsb512(ptr %__C)
28 %1 = bitcast <8 x i64> %__A to <64 x i8>
29 %2 = bitcast i64 %__B to <64 x i1>
30 %3 = select <64 x i1> %2, <64 x i8> %0, <64 x i8> %1
31 %4 = bitcast <64 x i8> %3 to <8 x i64>
35 define dso_local <8 x i64> @test_mm512_maskz_movrsb_epi8(i64 %__A, ptr %__B) {
36 ; CHECK-LABEL: test_mm512_maskz_movrsb_epi8:
37 ; CHECK: # %bb.0: # %entry
38 ; CHECK-NEXT: kmovq %rdi, %k1 # encoding: [0xc4,0xe1,0xfb,0x92,0xcf]
39 ; CHECK-NEXT: vmovrsb (%rsi), %zmm0 {%k1} {z} # encoding: [0x62,0xf5,0x7f,0xc9,0x6f,0x06]
40 ; CHECK-NEXT: retq # encoding: [0xc3]
42 %0 = tail call <64 x i8> @llvm.x86.avx10.vmovrsb512(ptr %__B)
43 %1 = bitcast i64 %__A to <64 x i1>
44 %2 = select <64 x i1> %1, <64 x i8> %0, <64 x i8> zeroinitializer
45 %3 = bitcast <64 x i8> %2 to <8 x i64>
49 define <8 x i64> @test_mm512_movrsd_epi32(ptr %__A) {
50 ; CHECK-LABEL: test_mm512_movrsd_epi32:
51 ; CHECK: # %bb.0: # %entry
52 ; CHECK-NEXT: vmovrsd (%rdi), %zmm0 # encoding: [0x62,0xf5,0x7e,0x48,0x6f,0x07]
53 ; CHECK-NEXT: retq # encoding: [0xc3]
55 %0 = tail call <16 x i32> @llvm.x86.avx10.vmovrsd512(ptr %__A)
56 %1 = bitcast <16 x i32> %0 to <8 x i64>
60 define <8 x i64> @test_mm512_mask_movrsd_epi32(<8 x i64> %__A, i16 zeroext %__B, ptr %__C) {
61 ; CHECK-LABEL: test_mm512_mask_movrsd_epi32:
62 ; CHECK: # %bb.0: # %entry
63 ; CHECK-NEXT: kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
64 ; CHECK-NEXT: vmovrsd (%rsi), %zmm0 {%k1} # encoding: [0x62,0xf5,0x7e,0x49,0x6f,0x06]
65 ; CHECK-NEXT: retq # encoding: [0xc3]
67 %0 = tail call <16 x i32> @llvm.x86.avx10.vmovrsd512(ptr %__C)
68 %1 = bitcast <8 x i64> %__A to <16 x i32>
69 %2 = bitcast i16 %__B to <16 x i1>
70 %3 = select <16 x i1> %2, <16 x i32> %0, <16 x i32> %1
71 %4 = bitcast <16 x i32> %3 to <8 x i64>
75 define <8 x i64> @test_mm512_maskz_movrsd_epi32(i16 zeroext %__A, ptr %__B) {
76 ; CHECK-LABEL: test_mm512_maskz_movrsd_epi32:
77 ; CHECK: # %bb.0: # %entry
78 ; CHECK-NEXT: kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
79 ; CHECK-NEXT: vmovrsd (%rsi), %zmm0 {%k1} {z} # encoding: [0x62,0xf5,0x7e,0xc9,0x6f,0x06]
80 ; CHECK-NEXT: retq # encoding: [0xc3]
82 %0 = tail call <16 x i32> @llvm.x86.avx10.vmovrsd512(ptr %__B)
83 %1 = bitcast i16 %__A to <16 x i1>
84 %2 = select <16 x i1> %1, <16 x i32> %0, <16 x i32> zeroinitializer
85 %3 = bitcast <16 x i32> %2 to <8 x i64>
89 define <8 x i64> @test_mm512_movrsq_epi64(ptr %__A) {
90 ; CHECK-LABEL: test_mm512_movrsq_epi64:
91 ; CHECK: # %bb.0: # %entry
92 ; CHECK-NEXT: vmovrsq (%rdi), %zmm0 # encoding: [0x62,0xf5,0xfe,0x48,0x6f,0x07]
93 ; CHECK-NEXT: retq # encoding: [0xc3]
95 %0 = tail call <8 x i64> @llvm.x86.avx10.vmovrsq512(ptr %__A)
99 define <8 x i64> @test_mm512_mask_movrsq_epi64(<8 x i64> %__A, i8 zeroext %__B, ptr %__C) {
100 ; CHECK-LABEL: test_mm512_mask_movrsq_epi64:
101 ; CHECK: # %bb.0: # %entry
102 ; CHECK-NEXT: kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
103 ; CHECK-NEXT: vmovrsq (%rsi), %zmm0 {%k1} # encoding: [0x62,0xf5,0xfe,0x49,0x6f,0x06]
104 ; CHECK-NEXT: retq # encoding: [0xc3]
106 %0 = tail call <8 x i64> @llvm.x86.avx10.vmovrsq512(ptr %__C)
107 %1 = bitcast i8 %__B to <8 x i1>
108 %2 = select <8 x i1> %1, <8 x i64> %0, <8 x i64> %__A
112 define <8 x i64> @test_mm512_maskz_movrsq_epi64(i8 zeroext %__A, ptr %__B) {
113 ; CHECK-LABEL: test_mm512_maskz_movrsq_epi64:
114 ; CHECK: # %bb.0: # %entry
115 ; CHECK-NEXT: kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
116 ; CHECK-NEXT: vmovrsq (%rsi), %zmm0 {%k1} {z} # encoding: [0x62,0xf5,0xfe,0xc9,0x6f,0x06]
117 ; CHECK-NEXT: retq # encoding: [0xc3]
119 %0 = tail call <8 x i64> @llvm.x86.avx10.vmovrsq512(ptr %__B)
120 %1 = bitcast i8 %__A to <8 x i1>
121 %2 = select <8 x i1> %1, <8 x i64> %0, <8 x i64> zeroinitializer
125 define <8 x i64> @test_mm512_movrsw_epi16(ptr %__A) {
126 ; CHECK-LABEL: test_mm512_movrsw_epi16:
127 ; CHECK: # %bb.0: # %entry
128 ; CHECK-NEXT: vmovrsw (%rdi), %zmm0 # encoding: [0x62,0xf5,0xff,0x48,0x6f,0x07]
129 ; CHECK-NEXT: retq # encoding: [0xc3]
131 %0 = tail call <32 x i16> @llvm.x86.avx10.vmovrsw512(ptr %__A)
132 %1 = bitcast <32 x i16> %0 to <8 x i64>
136 define <8 x i64> @test_mm512_mask_movrsw_epi16(<8 x i64> %__A, i32 %__B, ptr %__C) {
137 ; CHECK-LABEL: test_mm512_mask_movrsw_epi16:
138 ; CHECK: # %bb.0: # %entry
139 ; CHECK-NEXT: kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
140 ; CHECK-NEXT: vmovrsw (%rsi), %zmm0 {%k1} # encoding: [0x62,0xf5,0xff,0x49,0x6f,0x06]
141 ; CHECK-NEXT: retq # encoding: [0xc3]
143 %0 = tail call <32 x i16> @llvm.x86.avx10.vmovrsw512(ptr %__C)
144 %1 = bitcast <8 x i64> %__A to <32 x i16>
145 %2 = bitcast i32 %__B to <32 x i1>
146 %3 = select <32 x i1> %2, <32 x i16> %0, <32 x i16> %1
147 %4 = bitcast <32 x i16> %3 to <8 x i64>
151 define <8 x i64> @test_mm512_maskz_movrsw_epi16(i32 %__A, ptr %__B) {
152 ; CHECK-LABEL: test_mm512_maskz_movrsw_epi16:
153 ; CHECK: # %bb.0: # %entry
154 ; CHECK-NEXT: kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf]
155 ; CHECK-NEXT: vmovrsw (%rsi), %zmm0 {%k1} {z} # encoding: [0x62,0xf5,0xff,0xc9,0x6f,0x06]
156 ; CHECK-NEXT: retq # encoding: [0xc3]
158 %0 = tail call <32 x i16> @llvm.x86.avx10.vmovrsw512(ptr %__B)
159 %1 = bitcast i32 %__A to <32 x i1>
160 %2 = select <32 x i1> %1, <32 x i16> %0, <32 x i16> zeroinitializer
161 %3 = bitcast <32 x i16> %2 to <8 x i64>