| 1 |
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 |
; RUN: llc -mtriple=powerpc64-unknown-aix-xcoff -verify-machineinstrs \ |
| 3 |
; RUN: -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck \ |
| 4 |
; RUN: --check-prefix=AIX64 %s |
| 5 |
; RUN: llc -mtriple=powerpc-unknown-aix-xcoff -verify-machineinstrs \ |
| 6 |
; RUN: -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck \ |
| 7 |
; RUN: --check-prefix=AIX32 %s |
| 8 |
; RUN: llc -mtriple=powerpc64le-- -verify-machineinstrs \ |
| 9 |
; RUN: -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck --check-prefix=LE %s |
| 10 |
|
| 11 |
define dso_local void @test1(ptr %v, i64 %a) local_unnamed_addr #0 { |
| 12 |
; AIX64-LABEL: test1: |
| 13 |
; AIX64: # %bb.0: # %entry |
| 14 |
; AIX64-NEXT: mtvsrd vs34, r4 |
| 15 |
; AIX64-NEXT: #APP |
| 16 |
; AIX64-NEXT: stvx v2, 0, r3 |
| 17 |
; AIX64-NEXT: #NO_APP |
| 18 |
; AIX64-NEXT: blr |
| 19 |
; |
| 20 |
; AIX32-LABEL: test1: |
| 21 |
; AIX32: # %bb.0: # %entry |
| 22 |
; AIX32-NEXT: stw r5, -4(r1) |
| 23 |
; AIX32-NEXT: stw r4, -8(r1) |
| 24 |
; AIX32-NEXT: lfd f0, -8(r1) |
| 25 |
; AIX32-NEXT: xxlor vs34, f0, f0 |
| 26 |
; AIX32-NEXT: #APP |
| 27 |
; AIX32-NEXT: stvx v2, 0, r3 |
| 28 |
; AIX32-NEXT: #NO_APP |
| 29 |
; AIX32-NEXT: blr |
| 30 |
; |
| 31 |
; LE-LABEL: test1: |
| 32 |
; LE: # %bb.0: # %entry |
| 33 |
; LE-NEXT: mtvsrd vs34, r4 |
| 34 |
; LE-NEXT: #APP |
| 35 |
; LE-NEXT: stvx v2, 0, r3 |
| 36 |
; LE-NEXT: #NO_APP |
| 37 |
; LE-NEXT: blr |
| 38 |
entry: |
| 39 |
tail call void asm sideeffect "stvx $0,0,$1", "v,r,~{memory}"(i64 %a, ptr %v) |
| 40 |
ret void |
| 41 |
} |
| 42 |
|
| 43 |
define dso_local void @test2(ptr %v, i32 signext %a) local_unnamed_addr #0 { |
| 44 |
; AIX64-LABEL: test2: |
| 45 |
; AIX64: # %bb.0: # %entry |
| 46 |
; AIX64-NEXT: clrldi r4, r4, 32 |
| 47 |
; AIX64-NEXT: mtvsrd vs34, r4 |
| 48 |
; AIX64-NEXT: #APP |
| 49 |
; AIX64-NEXT: stvx v2, 0, r3 |
| 50 |
; AIX64-NEXT: #NO_APP |
| 51 |
; AIX64-NEXT: blr |
| 52 |
; |
| 53 |
; AIX32-LABEL: test2: |
| 54 |
; AIX32: # %bb.0: # %entry |
| 55 |
; AIX32-NEXT: stw r4, -4(r1) |
| 56 |
; AIX32-NEXT: li r4, 0 |
| 57 |
; AIX32-NEXT: stw r4, -8(r1) |
| 58 |
; AIX32-NEXT: lfd f0, -8(r1) |
| 59 |
; AIX32-NEXT: xxlor vs34, f0, f0 |
| 60 |
; AIX32-NEXT: #APP |
| 61 |
; AIX32-NEXT: stvx v2, 0, r3 |
| 62 |
; AIX32-NEXT: #NO_APP |
| 63 |
; AIX32-NEXT: blr |
| 64 |
; |
| 65 |
; LE-LABEL: test2: |
| 66 |
; LE: # %bb.0: # %entry |
| 67 |
; LE-NEXT: clrldi r4, r4, 32 |
| 68 |
; LE-NEXT: mtvsrd vs34, r4 |
| 69 |
; LE-NEXT: #APP |
| 70 |
; LE-NEXT: stvx v2, 0, r3 |
| 71 |
; LE-NEXT: #NO_APP |
| 72 |
; LE-NEXT: blr |
| 73 |
entry: |
| 74 |
tail call void asm sideeffect "stvx $0,0,$1", "v,r,~{memory}"(i32 %a, ptr %v) |
| 75 |
ret void |
| 76 |
} |
| 77 |
|
| 78 |
define dso_local void @test3(ptr %v, i16 signext %a) local_unnamed_addr #0 { |
| 79 |
; AIX64-LABEL: test3: |
| 80 |
; AIX64: # %bb.0: # %entry |
| 81 |
; AIX64-NEXT: clrldi r4, r4, 48 |
| 82 |
; AIX64-NEXT: mtvsrd vs34, r4 |
| 83 |
; AIX64-NEXT: #APP |
| 84 |
; AIX64-NEXT: stvx v2, 0, r3 |
| 85 |
; AIX64-NEXT: #NO_APP |
| 86 |
; AIX64-NEXT: blr |
| 87 |
; |
| 88 |
; AIX32-LABEL: test3: |
| 89 |
; AIX32: # %bb.0: # %entry |
| 90 |
; AIX32-NEXT: li r5, 0 |
| 91 |
; AIX32-NEXT: clrlwi r4, r4, 16 |
| 92 |
; AIX32-NEXT: stw r5, -8(r1) |
| 93 |
; AIX32-NEXT: stw r4, -4(r1) |
| 94 |
; AIX32-NEXT: lfd f0, -8(r1) |
| 95 |
; AIX32-NEXT: xxlor vs34, f0, f0 |
| 96 |
; AIX32-NEXT: #APP |
| 97 |
; AIX32-NEXT: stvx v2, 0, r3 |
| 98 |
; AIX32-NEXT: #NO_APP |
| 99 |
; AIX32-NEXT: blr |
| 100 |
; |
| 101 |
; LE-LABEL: test3: |
| 102 |
; LE: # %bb.0: # %entry |
| 103 |
; LE-NEXT: clrldi r4, r4, 48 |
| 104 |
; LE-NEXT: mtvsrd vs34, r4 |
| 105 |
; LE-NEXT: #APP |
| 106 |
; LE-NEXT: stvx v2, 0, r3 |
| 107 |
; LE-NEXT: #NO_APP |
| 108 |
; LE-NEXT: blr |
| 109 |
entry: |
| 110 |
tail call void asm sideeffect "stvx $0,0,$1", "v,r,~{memory}"(i16 %a, ptr %v) |
| 111 |
ret void |
| 112 |
} |
| 113 |
|
| 114 |
define dso_local void @test4(ptr %v, i8 signext %a) local_unnamed_addr #0 { |
| 115 |
; AIX64-LABEL: test4: |
| 116 |
; AIX64: # %bb.0: # %entry |
| 117 |
; AIX64-NEXT: clrldi r4, r4, 56 |
| 118 |
; AIX64-NEXT: mtvsrd vs34, r4 |
| 119 |
; AIX64-NEXT: #APP |
| 120 |
; AIX64-NEXT: stvx v2, 0, r3 |
| 121 |
; AIX64-NEXT: #NO_APP |
| 122 |
; AIX64-NEXT: blr |
| 123 |
; |
| 124 |
; AIX32-LABEL: test4: |
| 125 |
; AIX32: # %bb.0: # %entry |
| 126 |
; AIX32-NEXT: li r5, 0 |
| 127 |
; AIX32-NEXT: clrlwi r4, r4, 24 |
| 128 |
; AIX32-NEXT: stw r5, -8(r1) |
| 129 |
; AIX32-NEXT: stw r4, -4(r1) |
| 130 |
; AIX32-NEXT: lfd f0, -8(r1) |
| 131 |
; AIX32-NEXT: xxlor vs34, f0, f0 |
| 132 |
; AIX32-NEXT: #APP |
| 133 |
; AIX32-NEXT: stvx v2, 0, r3 |
| 134 |
; AIX32-NEXT: #NO_APP |
| 135 |
; AIX32-NEXT: blr |
| 136 |
; |
| 137 |
; LE-LABEL: test4: |
| 138 |
; LE: # %bb.0: # %entry |
| 139 |
; LE-NEXT: clrldi r4, r4, 56 |
| 140 |
; LE-NEXT: mtvsrd vs34, r4 |
| 141 |
; LE-NEXT: #APP |
| 142 |
; LE-NEXT: stvx v2, 0, r3 |
| 143 |
; LE-NEXT: #NO_APP |
| 144 |
; LE-NEXT: blr |
| 145 |
entry: |
| 146 |
tail call void asm sideeffect "stvx $0,0,$1", "v,r,~{memory}"(i8 %a, ptr %v) |
| 147 |
ret void |
| 148 |
} |
| 149 |
|
| 150 |
define dso_local void @test6(ptr %v, i32 zeroext %a) local_unnamed_addr #0 { |
| 151 |
; AIX64-LABEL: test6: |
| 152 |
; AIX64: # %bb.0: # %entry |
| 153 |
; AIX64-NEXT: mtvsrd vs34, r4 |
| 154 |
; AIX64-NEXT: #APP |
| 155 |
; AIX64-NEXT: stvx v2, 0, r3 |
| 156 |
; AIX64-NEXT: #NO_APP |
| 157 |
; AIX64-NEXT: blr |
| 158 |
; |
| 159 |
; AIX32-LABEL: test6: |
| 160 |
; AIX32: # %bb.0: # %entry |
| 161 |
; AIX32-NEXT: stw r4, -4(r1) |
| 162 |
; AIX32-NEXT: li r4, 0 |
| 163 |
; AIX32-NEXT: stw r4, -8(r1) |
| 164 |
; AIX32-NEXT: lfd f0, -8(r1) |
| 165 |
; AIX32-NEXT: xxlor vs34, f0, f0 |
| 166 |
; AIX32-NEXT: #APP |
| 167 |
; AIX32-NEXT: stvx v2, 0, r3 |
| 168 |
; AIX32-NEXT: #NO_APP |
| 169 |
; AIX32-NEXT: blr |
| 170 |
; |
| 171 |
; LE-LABEL: test6: |
| 172 |
; LE: # %bb.0: # %entry |
| 173 |
; LE-NEXT: mtvsrd vs34, r4 |
| 174 |
; LE-NEXT: #APP |
| 175 |
; LE-NEXT: stvx v2, 0, r3 |
| 176 |
; LE-NEXT: #NO_APP |
| 177 |
; LE-NEXT: blr |
| 178 |
entry: |
| 179 |
tail call void asm sideeffect "stvx $0,0,$1", "v,r,~{memory}"(i32 %a, ptr %v) |
| 180 |
ret void |
| 181 |
} |
| 182 |
|
| 183 |
define dso_local void @test7(ptr %v, i16 zeroext %a) local_unnamed_addr #0 { |
| 184 |
; AIX64-LABEL: test7: |
| 185 |
; AIX64: # %bb.0: # %entry |
| 186 |
; AIX64-NEXT: mtvsrd vs34, r4 |
| 187 |
; AIX64-NEXT: #APP |
| 188 |
; AIX64-NEXT: stvx v2, 0, r3 |
| 189 |
; AIX64-NEXT: #NO_APP |
| 190 |
; AIX64-NEXT: blr |
| 191 |
; |
| 192 |
; AIX32-LABEL: test7: |
| 193 |
; AIX32: # %bb.0: # %entry |
| 194 |
; AIX32-NEXT: stw r4, -4(r1) |
| 195 |
; AIX32-NEXT: li r4, 0 |
| 196 |
; AIX32-NEXT: stw r4, -8(r1) |
| 197 |
; AIX32-NEXT: lfd f0, -8(r1) |
| 198 |
; AIX32-NEXT: xxlor vs34, f0, f0 |
| 199 |
; AIX32-NEXT: #APP |
| 200 |
; AIX32-NEXT: stvx v2, 0, r3 |
| 201 |
; AIX32-NEXT: #NO_APP |
| 202 |
; AIX32-NEXT: blr |
| 203 |
; |
| 204 |
; LE-LABEL: test7: |
| 205 |
; LE: # %bb.0: # %entry |
| 206 |
; LE-NEXT: mtvsrd vs34, r4 |
| 207 |
; LE-NEXT: #APP |
| 208 |
; LE-NEXT: stvx v2, 0, r3 |
| 209 |
; LE-NEXT: #NO_APP |
| 210 |
; LE-NEXT: blr |
| 211 |
entry: |
| 212 |
tail call void asm sideeffect "stvx $0,0,$1", "v,r,~{memory}"(i16 %a, ptr %v) |
| 213 |
ret void |
| 214 |
} |
| 215 |
|
| 216 |
define dso_local void @test8(ptr %v, i8 zeroext %a) local_unnamed_addr #0 { |
| 217 |
; AIX64-LABEL: test8: |
| 218 |
; AIX64: # %bb.0: # %entry |
| 219 |
; AIX64-NEXT: mtvsrd vs34, r4 |
| 220 |
; AIX64-NEXT: #APP |
| 221 |
; AIX64-NEXT: stvx v2, 0, r3 |
| 222 |
; AIX64-NEXT: #NO_APP |
| 223 |
; AIX64-NEXT: blr |
| 224 |
; |
| 225 |
; AIX32-LABEL: test8: |
| 226 |
; AIX32: # %bb.0: # %entry |
| 227 |
; AIX32-NEXT: stw r4, -4(r1) |
| 228 |
; AIX32-NEXT: li r4, 0 |
| 229 |
; AIX32-NEXT: stw r4, -8(r1) |
| 230 |
; AIX32-NEXT: lfd f0, -8(r1) |
| 231 |
; AIX32-NEXT: xxlor vs34, f0, f0 |
| 232 |
; AIX32-NEXT: #APP |
| 233 |
; AIX32-NEXT: stvx v2, 0, r3 |
| 234 |
; AIX32-NEXT: #NO_APP |
| 235 |
; AIX32-NEXT: blr |
| 236 |
; |
| 237 |
; LE-LABEL: test8: |
| 238 |
; LE: # %bb.0: # %entry |
| 239 |
; LE-NEXT: mtvsrd vs34, r4 |
| 240 |
; LE-NEXT: #APP |
| 241 |
; LE-NEXT: stvx v2, 0, r3 |
| 242 |
; LE-NEXT: #NO_APP |
| 243 |
; LE-NEXT: blr |
| 244 |
entry: |
| 245 |
tail call void asm sideeffect "stvx $0,0,$1", "v,r,~{memory}"(i8 %a, ptr %v) |
| 246 |
ret void |
| 247 |
} |
| 248 |
|
| 249 |
attributes #0 = { nounwind } |