File: win64_vararg2.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (82 lines) | stat: -rw-r--r-- 2,974 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=aarch64-pc-win32 | FileCheck %s
; RUN: llc < %s -global-isel -mtriple=aarch64-pc-win32 | FileCheck %s --check-prefix=GISEL

; Function Attrs: mustprogress noinline nounwind optnone uwtable
define i1 @va_func(i32 %a, i8 %b, i8 %c, ...) {
; CHECK-LABEL: va_func:
; CHECK:       .seh_proc va_func
; CHECK-NEXT:  // %bb.0:
; CHECK-NEXT:    sub sp, sp, #80
; CHECK-NEXT:    .seh_stackalloc 80
; CHECK-NEXT:    str x19, [sp, #16] // 8-byte Folded Spill
; CHECK-NEXT:    .seh_save_reg x19, 16
; CHECK-NEXT:    str x30, [sp, #24] // 8-byte Folded Spill
; CHECK-NEXT:    .seh_save_reg x30, 24
; CHECK-NEXT:    .seh_endprologue
; CHECK-NEXT:    mov w19, w0
; CHECK-NEXT:    stp x3, x4, [sp, #40]
; CHECK-NEXT:    stp x5, x6, [sp, #56]
; CHECK-NEXT:    str x7, [sp, #72]
; CHECK-NEXT:    str w0, [sp, #12]
; CHECK-NEXT:    strb w1, [sp, #11]
; CHECK-NEXT:    strb w2, [sp, #10]
; CHECK-NEXT:    bl other
; CHECK-NEXT:    cmp w19, w0
; CHECK-NEXT:    cset w0, ls
; CHECK-NEXT:    .seh_startepilogue
; CHECK-NEXT:    ldr x30, [sp, #24] // 8-byte Folded Reload
; CHECK-NEXT:    .seh_save_reg x30, 24
; CHECK-NEXT:    ldr x19, [sp, #16] // 8-byte Folded Reload
; CHECK-NEXT:    .seh_save_reg x19, 16
; CHECK-NEXT:    add sp, sp, #80
; CHECK-NEXT:    .seh_stackalloc 80
; CHECK-NEXT:    .seh_endepilogue
; CHECK-NEXT:    ret
; CHECK-NEXT:    .seh_endfunclet
; CHECK-NEXT:    .seh_endproc
;
; GISEL-LABEL: va_func:
; GISEL:       .seh_proc va_func
; GISEL-NEXT:  // %bb.0:
; GISEL-NEXT:    sub sp, sp, #80
; GISEL-NEXT:    .seh_stackalloc 80
; GISEL-NEXT:    str x19, [sp, #16] // 8-byte Folded Spill
; GISEL-NEXT:    .seh_save_reg x19, 16
; GISEL-NEXT:    str x30, [sp, #24] // 8-byte Folded Spill
; GISEL-NEXT:    .seh_save_reg x30, 24
; GISEL-NEXT:    .seh_endprologue
; GISEL-NEXT:    stp x3, x4, [sp, #40]
; GISEL-NEXT:    mov w19, w0
; GISEL-NEXT:    stp x5, x6, [sp, #56]
; GISEL-NEXT:    str w0, [sp, #12]
; GISEL-NEXT:    str x7, [sp, #72]
; GISEL-NEXT:    strb w1, [sp, #11]
; GISEL-NEXT:    strb w2, [sp, #10]
; GISEL-NEXT:    bl other
; GISEL-NEXT:    cmp w19, w0
; GISEL-NEXT:    cset w0, ls
; GISEL-NEXT:    .seh_startepilogue
; GISEL-NEXT:    ldr x30, [sp, #24] // 8-byte Folded Reload
; GISEL-NEXT:    .seh_save_reg x30, 24
; GISEL-NEXT:    ldr x19, [sp, #16] // 8-byte Folded Reload
; GISEL-NEXT:    .seh_save_reg x19, 16
; GISEL-NEXT:    add sp, sp, #80
; GISEL-NEXT:    .seh_stackalloc 80
; GISEL-NEXT:    .seh_endepilogue
; GISEL-NEXT:    ret
; GISEL-NEXT:    .seh_endfunclet
; GISEL-NEXT:    .seh_endproc
  %a_alloc = alloca i32, align 4
  %b_alloc = alloca i8, align 1
  %c_alloc = alloca i8, align 1
  store i32 %a, ptr %a_alloc, align 4
  store i8 %b, ptr %b_alloc, align 1
  store i8 %c, ptr %c_alloc, align 1
  %a_load = load i32, ptr %a_alloc, align 4
  %ret = call noundef i32 @other()
  %cmp = icmp ule i32 %a_load, %ret
  ret i1 %cmp
}

declare i32 @other()