5
5
; RUN: -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr -mcpu=future < %s | \
6
6
; RUN: FileCheck %s
7
7
8
+ ; Test for load/store to/from v4i32.
9
+
8
10
define <4 x i32 > @testLXVRL (ptr %a , i64 %b ) {
9
11
; CHECK-LABEL: testLXVRL:
10
12
; CHECK: # %bb.0: # %entry
@@ -27,49 +29,97 @@ entry:
27
29
}
28
30
declare <4 x i32 > @llvm.ppc.vsx.lxvrll (ptr , i64 )
29
31
30
- define < 256 x i1 > @testLXVPRL ( ptr %vpp , i64 %b ) {
31
- ; CHECK-LABEL: testLXVPRL :
32
+ define void @testSTXVRL (< 4 x i32 > %a , ptr %b , i64 %c ) {
33
+ ; CHECK-LABEL: testSTXVRL :
32
34
; CHECK: # %bb.0: # %entry
33
- ; CHECK-NEXT: lxvprl vsp34, r4, r5
35
+ ; CHECK-NEXT: stxvrl v2, [[REG:r[0-9]+]], [[REG1:r[0-9]+]]
34
36
; CHECK: blr
35
37
entry:
36
- %0 = tail call < 256 x i1 > @llvm.ppc.vsx.lxvprl ( ptr %vpp , i64 %b )
37
- ret < 256 x i1 > %0
38
+ tail call void @llvm.ppc.vsx.stxvrl (< 4 x i32 > %a , ptr %b , i64 %c )
39
+ ret void
38
40
}
39
- declare < 256 x i1 > @llvm.ppc.vsx.lxvprl ( ptr , i64 )
41
+ declare void @llvm.ppc.vsx.stxvrl (< 4 x i32 >, ptr , i64 )
40
42
41
- define < 256 x i1 > @testLXVPRLL ( ptr %vpp , i64 %b ) {
42
- ; CHECK-LABEL: testLXVPRLL :
43
+ define void @testSTXVRLL (< 4 x i32 > %a , ptr %b , i64 %c ) {
44
+ ; CHECK-LABEL: testSTXVRLL :
43
45
; CHECK: # %bb.0: # %entry
44
- ; CHECK-NEXT: lxvprll vsp34, r4, r5
46
+ ; CHECK-NEXT: stxvrll v2, [[REG:r[0-9]+]], [[REG1:r[0-9]+]]
45
47
; CHECK: blr
46
48
entry:
47
- %0 = tail call < 256 x i1 > @llvm.ppc.vsx.lxvprll ( ptr %vpp , i64 %b )
48
- ret < 256 x i1 > %0
49
+ tail call void @llvm.ppc.vsx.stxvrll (< 4 x i32 > %a , ptr %b , i64 %c )
50
+ ret void
49
51
}
50
- declare < 256 x i1 > @llvm.ppc.vsx.lxvprll ( ptr , i64 )
52
+ declare void @llvm.ppc.vsx.stxvrll (< 4 x i32 >, ptr , i64 )
51
53
52
- define void @testSTXVRL (<4 x i32 > %a , ptr %b , i64 %c ) {
53
- ; CHECK-LABEL: testSTXVRL:
54
+ ; Test for load/store to/from v2i64.
55
+
56
+ define <2 x i64 > @testLXVRL2 (ptr %a , i64 %b ) {
57
+ ; CHECK-LABEL: testLXVRL2:
58
+ ; CHECK: # %bb.0: # %entry
59
+ ; CHECK-NEXT: lxvrl v2, r3, r4
60
+ ; CHECK-NEXT: blr
61
+ entry:
62
+ %0 = tail call <2 x i64 > @llvm.ppc.vsx.lxvrl.v2i64 (ptr %a , i64 %b )
63
+ ret <2 x i64 > %0
64
+ }
65
+ declare <2 x i64 > @llvm.ppc.vsx.lxvrl.v2i64 (ptr , i64 )
66
+
67
+ define <2 x i64 > @testLXVRLL2 (ptr %a , i64 %b ) {
68
+ ; CHECK-LABEL: testLXVRLL2:
69
+ ; CHECK: # %bb.0: # %entry
70
+ ; CHECK-NEXT: lxvrll v2, r3, r4
71
+ ; CHECK-NEXT: blr
72
+ entry:
73
+ %0 = tail call <2 x i64 > @llvm.ppc.vsx.lxvrll.v2i64 (ptr %a , i64 %b )
74
+ ret <2 x i64 > %0
75
+ }
76
+ declare <2 x i64 > @llvm.ppc.vsx.lxvrll.v2i64 (ptr , i64 )
77
+
78
+ define void @testSTXVRL2 (<2 x i64 > %a , ptr %b , i64 %c ) {
79
+ ; CHECK-LABEL: testSTXVRL2:
54
80
; CHECK: # %bb.0: # %entry
55
81
; CHECK-NEXT: stxvrl v2, [[REG:r[0-9]+]], [[REG1:r[0-9]+]]
56
82
; CHECK: blr
57
83
entry:
58
- tail call void @llvm.ppc.vsx.stxvrl (< 4 x i32 > %a , ptr %b , i64 %c )
84
+ tail call void @llvm.ppc.vsx.stxvrl.v2i64 (< 2 x i64 > %a , ptr %b , i64 %c )
59
85
ret void
60
86
}
61
- declare void @llvm.ppc.vsx.stxvrl (< 4 x i32 >, ptr , i64 )
87
+ declare void @llvm.ppc.vsx.stxvrl.v2i64 (< 2 x i64 >, ptr , i64 )
62
88
63
- define void @testSTXVRLL (< 4 x i32 > %a , ptr %b , i64 %c ) {
64
- ; CHECK-LABEL: testSTXVRLL :
89
+ define void @testSTXVRLL2 (< 2 x i64 > %a , ptr %b , i64 %c ) {
90
+ ; CHECK-LABEL: testSTXVRLL2 :
65
91
; CHECK: # %bb.0: # %entry
66
92
; CHECK-NEXT: stxvrll v2, [[REG:r[0-9]+]], [[REG1:r[0-9]+]]
67
93
; CHECK: blr
68
94
entry:
69
- tail call void @llvm.ppc.vsx.stxvrll (< 4 x i32 > %a , ptr %b , i64 %c )
95
+ tail call void @llvm.ppc.vsx.stxvrll.v2i64 (< 2 x i64 > %a , ptr %b , i64 %c )
70
96
ret void
71
97
}
72
- declare void @llvm.ppc.vsx.stxvrll (<4 x i32 >, ptr , i64 )
98
+ declare void @llvm.ppc.vsx.stxvrll.v2i64 (<2 x i64 >, ptr , i64 )
99
+
100
+ ; Test for load/store vectore pair.
101
+
102
+ define <256 x i1 > @testLXVPRL (ptr %vpp , i64 %b ) {
103
+ ; CHECK-LABEL: testLXVPRL:
104
+ ; CHECK: # %bb.0: # %entry
105
+ ; CHECK-NEXT: lxvprl vsp34, r4, r5
106
+ ; CHECK: blr
107
+ entry:
108
+ %0 = tail call <256 x i1 > @llvm.ppc.vsx.lxvprl (ptr %vpp , i64 %b )
109
+ ret <256 x i1 > %0
110
+ }
111
+ declare <256 x i1 > @llvm.ppc.vsx.lxvprl (ptr , i64 )
112
+
113
+ define <256 x i1 > @testLXVPRLL (ptr %vpp , i64 %b ) {
114
+ ; CHECK-LABEL: testLXVPRLL:
115
+ ; CHECK: # %bb.0: # %entry
116
+ ; CHECK-NEXT: lxvprll vsp34, r4, r5
117
+ ; CHECK: blr
118
+ entry:
119
+ %0 = tail call <256 x i1 > @llvm.ppc.vsx.lxvprll (ptr %vpp , i64 %b )
120
+ ret <256 x i1 > %0
121
+ }
122
+ declare <256 x i1 > @llvm.ppc.vsx.lxvprll (ptr , i64 )
73
123
74
124
define void @testSTXVPRL (ptr %v , ptr %vp , i64 %len ) {
75
125
; CHECK-LABEL: testSTXVPRL:
0 commit comments