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, %eax
23 ; CHECK-NEXT: movq %rax, %r10
24 ; CHECK-NEXT: movzbl %dh, %edx
25 ; CHECK-NEXT: movzbl %ch, %ebp
26 ; CHECK-NEXT: movq %r8, %rax
27 ; CHECK-NEXT: movzbl %ah, %ecx
28 ; CHECK-NEXT: movq %r9, %rax
29 ; CHECK-NEXT: movzbl %ah, %edi
30 ; CHECK-NEXT: movzbl {{[0-9]+}}(%rsp), %eax
31 ; CHECK-NEXT: movzbl {{[0-9]+}}(%rsp), %ebx
32 ; CHECK-NEXT: addq %r10, %rsi
33 ; CHECK-NEXT: addq %rbp, %rdx
34 ; CHECK-NEXT: addq %rsi, %rdx
35 ; CHECK-NEXT: addq %rdi, %rcx
36 ; CHECK-NEXT: addq %rbx, %rax
37 ; CHECK-NEXT: addq %rcx, %rax
38 ; CHECK-NEXT: addq %rdx, %rax
39 ; CHECK-NEXT: popq %rbx
40 ; CHECK-NEXT: .cfi_def_cfa_offset 16
41 ; CHECK-NEXT: popq %rbp
42 ; CHECK-NEXT: .cfi_def_cfa_offset 8
47 ; GNUX32-NEXT: pushq %rbp
48 ; GNUX32-NEXT: .cfi_def_cfa_offset 16
49 ; GNUX32-NEXT: pushq %rbx
50 ; GNUX32-NEXT: .cfi_def_cfa_offset 24
51 ; GNUX32-NEXT: .cfi_offset %rbx, -24
52 ; GNUX32-NEXT: .cfi_offset %rbp, -16
53 ; GNUX32-NEXT: movq %rsi, %rax
54 ; GNUX32-NEXT: movq %rdi, %rbx
55 ; GNUX32-NEXT: movzbl %bh, %esi
56 ; GNUX32-NEXT: movzbl %ah, %eax
57 ; GNUX32-NEXT: movq %rax, %r10
58 ; GNUX32-NEXT: movzbl %dh, %edx
59 ; GNUX32-NEXT: movzbl %ch, %ebp
60 ; GNUX32-NEXT: movq %r8, %rax
61 ; GNUX32-NEXT: movzbl %ah, %ecx
62 ; GNUX32-NEXT: movq %r9, %rax
63 ; GNUX32-NEXT: movzbl %ah, %edi
64 ; GNUX32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
65 ; GNUX32-NEXT: movzbl {{[0-9]+}}(%esp), %ebx
66 ; GNUX32-NEXT: addq %r10, %rsi
67 ; GNUX32-NEXT: addq %rbp, %rdx
68 ; GNUX32-NEXT: addq %rsi, %rdx
69 ; GNUX32-NEXT: addq %rdi, %rcx
70 ; GNUX32-NEXT: addq %rbx, %rax
71 ; GNUX32-NEXT: addq %rcx, %rax
72 ; GNUX32-NEXT: addq %rdx, %rax
73 ; GNUX32-NEXT: popq %rbx
74 ; GNUX32-NEXT: .cfi_def_cfa_offset 16
75 ; GNUX32-NEXT: popq %rbp
76 ; GNUX32-NEXT: .cfi_def_cfa_offset 8