1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-linux -mattr=-bmi | FileCheck %s --check-prefix=CHECK
3 ; RUN: llc < %s -mtriple=x86_64-linux-gnux32 -mattr=-bmi | FileCheck %s --check-prefix=GNUX32
5 ; LLVM creates virtual registers for values live across blocks
6 ; based on the type of the value. Make sure that the extracts
7 ; here use the GR64_NOREX register class for their result,
8 ; instead of plain GR64.
10 define i64 @foo(i64 %a, i64 %b, i64 %c, i64 %d, i64 %e, i64 %f, i64 %g, i64 %h) {
13 ; CHECK-NEXT: pushq %rbp
14 ; CHECK-NEXT: .cfi_def_cfa_offset 16
15 ; CHECK-NEXT: pushq %rbx
16 ; CHECK-NEXT: .cfi_def_cfa_offset 24
17 ; CHECK-NEXT: .cfi_offset %rbx, -24
18 ; CHECK-NEXT: .cfi_offset %rbp, -16
19 ; CHECK-NEXT: movq %rsi, %rax
20 ; CHECK-NEXT: movq %rdi, %rbx
21 ; CHECK-NEXT: movzbl %bh, %esi
22 ; CHECK-NEXT: movzbl %ah, %edi
23 ; CHECK-NEXT: movzbl %dh, %edx
24 ; CHECK-NEXT: movzbl %ch, %ebp
25 ; CHECK-NEXT: movq %r8, %rax
26 ; CHECK-NEXT: movzbl %ah, %ecx
27 ; CHECK-NEXT: movq %r9, %rax
28 ; CHECK-NEXT: movzbl %ah, %ebx
29 ; CHECK-NEXT: movzbl {{[0-9]+}}(%rsp), %eax
30 ; CHECK-NEXT: movzbl {{[0-9]+}}(%rsp), %r8d
31 ; CHECK-NEXT: addq %rdi, %rsi
32 ; CHECK-NEXT: addq %rbp, %rdx
33 ; CHECK-NEXT: addq %rsi, %rdx
34 ; CHECK-NEXT: addq %rbx, %rcx
35 ; CHECK-NEXT: addq %r8, %rax
36 ; CHECK-NEXT: addq %rcx, %rax
37 ; CHECK-NEXT: addq %rdx, %rax
38 ; CHECK-NEXT: popq %rbx
39 ; CHECK-NEXT: .cfi_def_cfa_offset 16
40 ; CHECK-NEXT: popq %rbp
41 ; CHECK-NEXT: .cfi_def_cfa_offset 8
46 ; GNUX32-NEXT: pushq %rbp
47 ; GNUX32-NEXT: .cfi_def_cfa_offset 16
48 ; GNUX32-NEXT: pushq %rbx
49 ; GNUX32-NEXT: .cfi_def_cfa_offset 24
50 ; GNUX32-NEXT: .cfi_offset %rbx, -24
51 ; GNUX32-NEXT: .cfi_offset %rbp, -16
52 ; GNUX32-NEXT: movq %rsi, %rax
53 ; GNUX32-NEXT: movq %rdi, %rbx
54 ; GNUX32-NEXT: movzbl %bh, %esi
55 ; GNUX32-NEXT: movzbl %ah, %edi
56 ; GNUX32-NEXT: movzbl %dh, %edx
57 ; GNUX32-NEXT: movzbl %ch, %ebp
58 ; GNUX32-NEXT: movq %r8, %rax
59 ; GNUX32-NEXT: movzbl %ah, %ecx
60 ; GNUX32-NEXT: movq %r9, %rax
61 ; GNUX32-NEXT: movzbl %ah, %ebx
62 ; GNUX32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
63 ; GNUX32-NEXT: movzbl {{[0-9]+}}(%esp), %r8d
64 ; GNUX32-NEXT: addq %rdi, %rsi
65 ; GNUX32-NEXT: addq %rbp, %rdx
66 ; GNUX32-NEXT: addq %rsi, %rdx
67 ; GNUX32-NEXT: addq %rbx, %rcx
68 ; GNUX32-NEXT: addq %r8, %rax
69 ; GNUX32-NEXT: addq %rcx, %rax
70 ; GNUX32-NEXT: addq %rdx, %rax
71 ; GNUX32-NEXT: popq %rbx
72 ; GNUX32-NEXT: .cfi_def_cfa_offset 16
73 ; GNUX32-NEXT: popq %rbp
74 ; GNUX32-NEXT: .cfi_def_cfa_offset 8