1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ;; Check that we accept functions with '$' in the name.
3 ; RUN: llc -mtriple=x86_64 < %s | FileCheck %s
5 ;; Check that we accept .Ldsolocal$local: below the function label.
6 ; RUN: llc -mtriple=x86_64 -relocation-model=pic < %s | FileCheck %s --check-prefix=PIC
8 ;; Check that we accept .seh_proc below the function label.
9 ; RUN: llc -mtriple=x86_64-windows -relocation-model=pic < %s | FileCheck %s --check-prefix=WIN
11 @gv0 = dso_local global i32 0, align 4
12 @gv1 = dso_preemptable global i32 0, align 4
14 define hidden i32 @"_Z54bar$ompvariant$bar"() {
15 ; CHECK-LABEL: _Z54bar$ompvariant$bar:
16 ; CHECK: # %bb.0: # %entry
17 ; CHECK-NEXT: movl $2, %eax
20 ; PIC-LABEL: _Z54bar$ompvariant$bar:
21 ; PIC: # %bb.0: # %entry
22 ; PIC-NEXT: movl $2, %eax
25 ; WIN-LABEL: _Z54bar$ompvariant$bar:
26 ; WIN: # %bb.0: # %entry
27 ; WIN-NEXT: movl $2, %eax
33 define dso_local i32 @dsolocal() {
34 ; CHECK-LABEL: dsolocal:
35 ; CHECK: # %bb.0: # %entry
36 ; CHECK-NEXT: pushq %rax
37 ; CHECK-NEXT: .cfi_def_cfa_offset 16
38 ; CHECK-NEXT: callq ext@PLT
39 ; CHECK-NEXT: movl $2, %eax
40 ; CHECK-NEXT: popq %rcx
41 ; CHECK-NEXT: .cfi_def_cfa_offset 8
44 ; PIC-LABEL: dsolocal:
45 ; PIC: # %bb.0: # %entry
46 ; PIC-NEXT: pushq %rax
47 ; PIC-NEXT: .cfi_def_cfa_offset 16
48 ; PIC-NEXT: callq ext@PLT
49 ; PIC-NEXT: movl $2, %eax
51 ; PIC-NEXT: .cfi_def_cfa_offset 8
54 ; WIN-LABEL: dsolocal:
55 ; WIN: # %bb.0: # %entry
56 ; WIN-NEXT: subq $40, %rsp
57 ; WIN-NEXT: .seh_stackalloc 40
58 ; WIN-NEXT: .seh_endprologue
60 ; WIN-NEXT: movl $2, %eax
61 ; WIN-NEXT: addq $40, %rsp
63 ; WIN-NEXT: .seh_endproc
73 ; CHECK: # %bb.0: # %entry
74 ; CHECK-NEXT: movl gv0(%rip), %eax
75 ; CHECK-NEXT: movq gv1@GOTPCREL(%rip), %rcx
76 ; CHECK-NEXT: addl (%rcx), %eax
80 ; PIC: # %bb.0: # %entry
81 ; PIC-NEXT: movl .Lgv0$local(%rip), %eax
82 ; PIC-NEXT: movq gv1@GOTPCREL(%rip), %rcx
83 ; PIC-NEXT: addl (%rcx), %eax
87 ; WIN: # %bb.0: # %entry
88 ; WIN-NEXT: movl gv0(%rip), %eax
89 ; WIN-NEXT: addl gv1(%rip), %eax
92 %a = load i32, i32* @gv0
93 %b = load i32, i32* @gv1
98 declare i32 @pers(...)
100 define i32 @eh() personality ptr @pers {
103 ; CHECK-NEXT: xorl %eax, %eax
108 ; PIC-NEXT: xorl %eax, %eax
113 ; WIN-NEXT: xorl %eax, %eax
115 ; WIN-NEXT: .Lfunc_end0:
116 ; WIN-NEXT: .seh_handlerdata
118 ; WIN-NEXT: .seh_endproc