|
1 | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2 | 2 | ; RUN: llc < %s -mtriple=i686-apple-darwin | FileCheck %s --check-prefixes=X86
|
3 |
| -; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s --check-prefixes=X64,X64-NOTBM |
4 |
| -; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+tbm | FileCheck %s --check-prefixes=X64,X64-TBM |
5 |
| -; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+bmi2 | FileCheck %s --check-prefixes=X64,X64-NOTBM |
| 3 | +; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s --check-prefixes=X64,X64-NOTBM,X64-NOBMI2 |
| 4 | +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+tbm | FileCheck %s --check-prefixes=X64,X64-NOBMI2,X64-TBM |
| 5 | +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+bmi2 | FileCheck %s --check-prefixes=X64,X64-NOTBM,X64-BMI2 |
6 | 6 | ; rdar://7329206
|
7 | 7 |
|
8 | 8 | define zeroext i16 @t1(i16 zeroext %x) nounwind readnone ssp {
|
@@ -191,12 +191,18 @@ define i64 @t9(i32 %0, i32 %1) {
|
191 | 191 | ; X86-NEXT: xorl %edx, %edx
|
192 | 192 | ; X86-NEXT: retl
|
193 | 193 | ;
|
194 |
| -; X64-LABEL: t9: |
195 |
| -; X64: ## %bb.0: |
196 |
| -; X64-NEXT: xorl %eax, %eax |
197 |
| -; X64-NEXT: btl %esi, %edi |
198 |
| -; X64-NEXT: setb %al |
199 |
| -; X64-NEXT: retq |
| 194 | +; X64-NOBMI2-LABEL: t9: |
| 195 | +; X64-NOBMI2: ## %bb.0: |
| 196 | +; X64-NOBMI2-NEXT: xorl %eax, %eax |
| 197 | +; X64-NOBMI2-NEXT: btl %esi, %edi |
| 198 | +; X64-NOBMI2-NEXT: setb %al |
| 199 | +; X64-NOBMI2-NEXT: retq |
| 200 | +; |
| 201 | +; X64-BMI2-LABEL: t9: |
| 202 | +; X64-BMI2: ## %bb.0: |
| 203 | +; X64-BMI2-NEXT: shrxl %esi, %edi, %eax |
| 204 | +; X64-BMI2-NEXT: andl $1, %eax |
| 205 | +; X64-BMI2-NEXT: retq |
200 | 206 | %3 = lshr i32 %0, %1
|
201 | 207 | %4 = and i32 %3, 1
|
202 | 208 | %5 = icmp ne i32 %4, 0
|
@@ -311,14 +317,22 @@ define i32 @PR55138(i32 %x) {
|
311 | 317 | ; X86-NEXT: setb %al
|
312 | 318 | ; X86-NEXT: retl
|
313 | 319 | ;
|
314 |
| -; X64-LABEL: PR55138: |
315 |
| -; X64: ## %bb.0: |
316 |
| -; X64-NEXT: andl $15, %edi |
317 |
| -; X64-NEXT: movl $27030, %ecx ## imm = 0x6996 |
318 |
| -; X64-NEXT: xorl %eax, %eax |
319 |
| -; X64-NEXT: btl %edi, %ecx |
320 |
| -; X64-NEXT: setb %al |
321 |
| -; X64-NEXT: retq |
| 320 | +; X64-NOBMI2-LABEL: PR55138: |
| 321 | +; X64-NOBMI2: ## %bb.0: |
| 322 | +; X64-NOBMI2-NEXT: andl $15, %edi |
| 323 | +; X64-NOBMI2-NEXT: movl $27030, %ecx ## imm = 0x6996 |
| 324 | +; X64-NOBMI2-NEXT: xorl %eax, %eax |
| 325 | +; X64-NOBMI2-NEXT: btl %edi, %ecx |
| 326 | +; X64-NOBMI2-NEXT: setb %al |
| 327 | +; X64-NOBMI2-NEXT: retq |
| 328 | +; |
| 329 | +; X64-BMI2-LABEL: PR55138: |
| 330 | +; X64-BMI2: ## %bb.0: |
| 331 | +; X64-BMI2-NEXT: andb $15, %dil |
| 332 | +; X64-BMI2-NEXT: movl $27030, %eax ## imm = 0x6996 |
| 333 | +; X64-BMI2-NEXT: shrxl %edi, %eax, %eax |
| 334 | +; X64-BMI2-NEXT: andl $1, %eax |
| 335 | +; X64-BMI2-NEXT: retq |
322 | 336 | %urem = and i32 %x, 15
|
323 | 337 | %shr = lshr i32 27030, %urem
|
324 | 338 | %and = and i32 %shr, 1
|
|
0 commit comments