@@ -12,6 +12,18 @@ define <32 x i8> @shufflevector_v32i8(<32 x i8> %a, <32 x i8> %b) {
12
12
ret <32 x i8 > %c
13
13
}
14
14
15
+ ;; xvrepl128vei.b
16
+ define <32 x i8 > @shufflevector_v32i8_undef (<32 x i8 > %a ) {
17
+ ; CHECK-LABEL: shufflevector_v32i8_undef:
18
+ ; CHECK: # %bb.0:
19
+ ; CHECK-NEXT: xvpermi.d $xr0, $xr0, 68
20
+ ; CHECK-NEXT: xvrepl128vei.b $xr0, $xr0, 1
21
+ ; CHECK-NEXT: ret
22
+ %c = shufflevector <32 x i8 > %a , <32 x i8 > poison, <32 x i32 > <i32 1 , i32 1 , i32 1 , i32 1 , i32 1 , i32 1 , i32 1 , i32 1 , i32 1 , i32 1 , i32 1 , i32 1 , i32 1 , i32 1 , i32 1 , i32 1 ,
23
+ i32 33 , i32 33 , i32 33 , i32 33 , i32 33 , i32 33 , i32 33 , i32 33 , i32 33 , i32 33 , i32 33 , i32 33 , i32 33 , i32 33 , i32 33 , i32 33 >
24
+ ret <32 x i8 > %c
25
+ }
26
+
15
27
;; xvrepl128vei.h
16
28
define <16 x i16 > @shufflevector_v16i16 (<16 x i16 > %a , <16 x i16 > %b ) {
17
29
; CHECK-LABEL: shufflevector_v16i16:
@@ -23,6 +35,18 @@ define <16 x i16> @shufflevector_v16i16(<16 x i16> %a, <16 x i16> %b) {
23
35
ret <16 x i16 > %c
24
36
}
25
37
38
+ ;; xvrepl128vei.h
39
+ define <16 x i16 > @shufflevector_v16i16_undef (<16 x i16 > %a ) {
40
+ ; CHECK-LABEL: shufflevector_v16i16_undef:
41
+ ; CHECK: # %bb.0:
42
+ ; CHECK-NEXT: xvpermi.d $xr0, $xr0, 68
43
+ ; CHECK-NEXT: xvrepl128vei.h $xr0, $xr0, 3
44
+ ; CHECK-NEXT: ret
45
+ %c = shufflevector <16 x i16 > %a , <16 x i16 > poison, <16 x i32 > <i32 3 , i32 3 , i32 3 , i32 3 , i32 3 , i32 3 , i32 3 , i32 3 ,
46
+ i32 17 , i32 17 , i32 17 , i32 17 , i32 17 , i32 17 , i32 17 , i32 17 >
47
+ ret <16 x i16 > %c
48
+ }
49
+
26
50
;; xvrepl128vei.w
27
51
define <8 x i32 > @shufflevector_v8i32 (<8 x i32 > %a , <8 x i32 > %b ) {
28
52
; CHECK-LABEL: shufflevector_v8i32:
@@ -34,6 +58,17 @@ define <8 x i32> @shufflevector_v8i32(<8 x i32> %a, <8 x i32> %b) {
34
58
ret <8 x i32 > %c
35
59
}
36
60
61
+ ;; xvrepl128vei.w
62
+ define <8 x i32 > @shufflevector_v8i32_undef (<8 x i32 > %a ) {
63
+ ; CHECK-LABEL: shufflevector_v8i32_undef:
64
+ ; CHECK: # %bb.0:
65
+ ; CHECK-NEXT: xvpermi.d $xr0, $xr0, 68
66
+ ; CHECK-NEXT: xvrepl128vei.w $xr0, $xr0, 2
67
+ ; CHECK-NEXT: ret
68
+ %c = shufflevector <8 x i32 > %a , <8 x i32 > poison, <8 x i32 > <i32 2 , i32 2 , i32 2 , i32 2 , i32 8 , i32 8 , i32 8 , i32 8 >
69
+ ret <8 x i32 > %c
70
+ }
71
+
37
72
;; xvrepl128vei.d
38
73
define <4 x i64 > @shufflevector_v4i64 (<4 x i64 > %a , <4 x i64 > %b ) {
39
74
; CHECK-LABEL: shufflevector_v4i64:
@@ -44,6 +79,17 @@ define <4 x i64> @shufflevector_v4i64(<4 x i64> %a, <4 x i64> %b) {
44
79
ret <4 x i64 > %c
45
80
}
46
81
82
+ ;; xvrepl128vei.d
83
+ define <4 x i64 > @shufflevector_v4i64_undef (<4 x i64 > %a ) {
84
+ ; CHECK-LABEL: shufflevector_v4i64_undef:
85
+ ; CHECK: # %bb.0:
86
+ ; CHECK-NEXT: xvpermi.d $xr0, $xr0, 68
87
+ ; CHECK-NEXT: xvrepl128vei.d $xr0, $xr0, 1
88
+ ; CHECK-NEXT: ret
89
+ %c = shufflevector <4 x i64 > %a , <4 x i64 > poison, <4 x i32 > <i32 1 , i32 1 , i32 5 , i32 5 >
90
+ ret <4 x i64 > %c
91
+ }
92
+
47
93
;; xvrepl128vei.w
48
94
define <8 x float > @shufflevector_v8f32 (<8 x float > %a , <8 x float > %b ) {
49
95
; CHECK-LABEL: shufflevector_v8f32:
@@ -54,6 +100,17 @@ define <8 x float> @shufflevector_v8f32(<8 x float> %a, <8 x float> %b) {
54
100
ret <8 x float > %c
55
101
}
56
102
103
+ ;; xvrepl128vei.w
104
+ define <8 x float > @shufflevector_v8f32_undef (<8 x float > %a ) {
105
+ ; CHECK-LABEL: shufflevector_v8f32_undef:
106
+ ; CHECK: # %bb.0:
107
+ ; CHECK-NEXT: xvpermi.d $xr0, $xr0, 78
108
+ ; CHECK-NEXT: xvrepl128vei.w $xr0, $xr0, 1
109
+ ; CHECK-NEXT: ret
110
+ %c = shufflevector <8 x float > %a , <8 x float > poison, <8 x i32 > <i32 5 , i32 5 , i32 5 , i32 5 , i32 9 , i32 9 , i32 9 , i32 9 >
111
+ ret <8 x float > %c
112
+ }
113
+
57
114
;; xvrepl128vei.d
58
115
define <4 x double > @shufflevector_v4f64 (<4 x double > %a , <4 x double > %b ) {
59
116
; CHECK-LABEL: shufflevector_v4f64:
@@ -63,3 +120,14 @@ define <4 x double> @shufflevector_v4f64(<4 x double> %a, <4 x double> %b) {
63
120
%c = shufflevector <4 x double > %a , <4 x double > %b , <4 x i32 > <i32 5 , i32 5 , i32 7 , i32 7 >
64
121
ret <4 x double > %c
65
122
}
123
+
124
+ ;; xvrepl128vei.d
125
+ define <4 x double > @shufflevector_v4f64_undef (<4 x double > %a ) {
126
+ ; CHECK-LABEL: shufflevector_v4f64_undef:
127
+ ; CHECK: # %bb.0:
128
+ ; CHECK-NEXT: xvpermi.d $xr0, $xr0, 68
129
+ ; CHECK-NEXT: xvrepl128vei.d $xr0, $xr0, 0
130
+ ; CHECK-NEXT: ret
131
+ %c = shufflevector <4 x double > %a , <4 x double > poison, <4 x i32 > <i32 0 , i32 0 , i32 7 , i32 7 >
132
+ ret <4 x double > %c
133
+ }
0 commit comments