1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64 < %s | FileCheck %s --check-prefix=PIC
3 ; RUN: llc -mtriple=x86_64-windows < %s | FileCheck %s --check-prefix=WIN
5 define i64 @i64_test(i64 %i) nounwind readnone {
8 ; PIC-NEXT: movq %rdi, %rax
9 ; PIC-NEXT: addq -{{[0-9]+}}(%rsp), %rax
12 ; WIN-LABEL: i64_test:
14 ; WIN-NEXT: pushq %rax
15 ; WIN-NEXT: movq %rcx, %rax
16 ; WIN-NEXT: addq (%rsp), %rax
20 %j = load i64, i64 * %loc
25 define i64 @i32_test(i32 %i) nounwind readnone {
26 ; PIC-LABEL: i32_test:
28 ; PIC-NEXT: movl %edi, %eax
29 ; PIC-NEXT: addl -{{[0-9]+}}(%rsp), %eax
32 ; WIN-LABEL: i32_test:
34 ; WIN-NEXT: pushq %rax
35 ; WIN-NEXT: movl %ecx, %eax
36 ; WIN-NEXT: addl {{[0-9]+}}(%rsp), %eax
40 %j = load i32, i32 * %loc
42 %ext = zext i32 %r to i64
46 define i64 @i16_test(i16 %i) nounwind readnone {
47 ; PIC-LABEL: i16_test:
49 ; PIC-NEXT: addw -{{[0-9]+}}(%rsp), %di
50 ; PIC-NEXT: movzwl %di, %eax
53 ; WIN-LABEL: i16_test:
55 ; WIN-NEXT: pushq %rax
56 ; WIN-NEXT: addw {{[0-9]+}}(%rsp), %cx
57 ; WIN-NEXT: movzwl %cx, %eax
61 %j = load i16, i16 * %loc
63 %ext = zext i16 %r to i64
67 define i64 @i8_test(i8 %i) nounwind readnone {
70 ; PIC-NEXT: addb -{{[0-9]+}}(%rsp), %dil
71 ; PIC-NEXT: movzbl %dil, %eax
76 ; WIN-NEXT: pushq %rax
77 ; WIN-NEXT: addb {{[0-9]+}}(%rsp), %cl
78 ; WIN-NEXT: movzbl %cl, %eax
82 %j = load i8, i8 * %loc
84 %ext = zext i8 %r to i64