File: issue64826-switferror-eh.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (77 lines) | stat: -rw-r--r-- 3,147 bytes parent folder | download | duplicates (7)
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
; RUN: llc %s -filetype=obj -o - | llvm-readobj -r - | FileCheck %s --check-prefix=RELOC
; RUN: llc %s -o - | FileCheck %s --check-prefix=ASM

target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx"

declare void @issue64826(i64, ptr, ptr swifterror)

define swiftcc void @rdar113994760() personality ptr @__gcc_personality_v0 {
entry:
  %swifterror = alloca swifterror ptr, align 8
  invoke swiftcc void @issue64826(i64 0, ptr null, ptr swifterror %swifterror)
          to label %.noexc unwind label %tsan_cleanup

.noexc:                                           ; preds = %entry
  ret void

tsan_cleanup:                                     ; preds = %entry
  %cleanup.lpad = landingpad { ptr, i32 }
          cleanup
  resume { ptr, i32 } zeroinitializer
}

declare i32 @__gcc_personality_v0(...)

; RELOC-LABEL: Relocations [
; RELOC-NEXT:    Section __text {
; RELOC-NEXT:      0x19 1 2 1 X86_64_RELOC_BRANCH 0 __Unwind_Resume
; RELOC-NEXT:      0xB 1 2 1 X86_64_RELOC_BRANCH 0 _issue64826
; RELOC-NEXT:    }
; RELOC-NEXT:    Section __eh_frame {
; RELOC-NEXT:      0x13 1 2 1 X86_64_RELOC_GOT 0 ___gcc_personality_v0
; RELOC-NEXT:    }
; RELOC-NEXT:  ]

; ASM-LABEL: rdar113994760:
; ASM:       ## %bb.0: ## %entry
; ASM-NEXT:    pushq %r12
; ASM-NEXT:    .cfi_def_cfa_offset 16
; ASM-NEXT:    subq $16, %rsp
; ASM-NEXT:    .cfi_def_cfa_offset 32
; ASM-NEXT:    .cfi_offset %r12, -16
; ASM-NEXT:  Ltmp0:
; ASM-NEXT:    xorl %edi, %edi
; ASM-NEXT:    xorl %esi, %esi
; ASM-NEXT:    callq   _issue64826
; ASM-NEXT:  Ltmp1:
; ASM-NEXT:  ## %bb.1: ## %.noexc
; ASM-NEXT:    addq $16, %rsp
; ASM-NEXT:    popq %r12
; ASM-NEXT:    retq
; ASM-NEXT:  LBB0_2: ## %tsan_cleanup
; ASM-NEXT:  Ltmp2:
; ASM-NEXT:    xorl %edi, %edi
; ASM-NEXT:    callq __Unwind_Resume
; ASM-NEXT:  Lfunc_end0:
; ASM-NEXT:    .cfi_endproc
; ASM-NEXT:    .section        __TEXT,__gcc_except_tab
; ASM-NEXT:    .p2align        2, 0x0
; ASM-NEXT: GCC_except_table0:
; ASM-NEXT: Lexception0:
; ASM-NEXT:    .byte   255                             ## @LPStart Encoding = omit
; ASM-NEXT:    .byte   255                             ## @TType Encoding = omit
; ASM-NEXT:    .byte   1                               ## Call site Encoding = uleb128
; ASM-NEXT:    .uleb128 Lcst_end0-Lcst_begin0
; ASM-NEXT: Lcst_begin0:
; ASM-NEXT:    .uleb128 Ltmp0-Lfunc_begin0             ## >> Call Site 1 <<
; ASM-NEXT:    .uleb128 Ltmp1-Ltmp0                    ##   Call between Ltmp0 and Ltmp1
; ASM-NEXT:    .uleb128 Ltmp2-Lfunc_begin0             ##     jumps to Ltmp2
; ASM-NEXT:    .byte   0                               ##   On action: cleanup
; ASM-NEXT:    .uleb128 Ltmp1-Lfunc_begin0             ## >> Call Site 2 <<
; ASM-NEXT:    .uleb128 Lfunc_end0-Ltmp1               ##   Call between Ltmp1 and Lfunc_end0
; ASM-NEXT:    .byte   0                               ##     has no landing pad
; ASM-NEXT:    .byte   0                               ##   On action: cleanup
; ASM-NEXT: Lcst_end0:
; ASM-NEXT:    .p2align        2, 0x0
; ASM-NEXT:                                         ## -- End function