1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc %s -mtriple=x86_64-unknown-linux-gnu -o - -verify-dom-info | FileCheck %s
3 ; RUN: llc %s -mtriple=x86_64-unknown-linux-gnu -disable-check-noreturn-call=true -o - -verify-dom-info | FileCheck --check-prefix=DISNOTET %s
5 ; Function Attrs: sspreq
6 define void @_Z7catchesv() #0 personality ptr null {
7 ; CHECK-LABEL: _Z7catchesv:
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: pushq %rax
10 ; CHECK-NEXT: .cfi_def_cfa_offset 16
11 ; CHECK-NEXT: movq %fs:40, %rax
12 ; CHECK-NEXT: movq %rax, (%rsp)
14 ; CHECK-NEXT: xorl %eax, %eax
15 ; CHECK-NEXT: xorl %edi, %edi
16 ; CHECK-NEXT: xorl %esi, %esi
17 ; CHECK-NEXT: xorl %edx, %edx
18 ; CHECK-NEXT: callq *%rax
20 ; CHECK-NEXT: # %bb.1: # %invoke.cont
21 ; CHECK-NEXT: movq %fs:40, %rax
22 ; CHECK-NEXT: cmpq (%rsp), %rax
23 ; CHECK-NEXT: jne .LBB0_6
24 ; CHECK-NEXT: # %bb.2: # %SP_return
26 ; CHECK-NEXT: xorl %eax, %eax
27 ; CHECK-NEXT: xorl %edi, %edi
28 ; CHECK-NEXT: callq *%rax
30 ; CHECK-NEXT: # %bb.3: # %invoke.cont2
31 ; CHECK-NEXT: .LBB0_4: # %lpad1
33 ; CHECK-NEXT: movq %fs:40, %rax
34 ; CHECK-NEXT: cmpq (%rsp), %rax
35 ; CHECK-NEXT: jne .LBB0_6
36 ; CHECK-NEXT: # %bb.5: # %SP_return3
37 ; CHECK-NEXT: popq %rax
38 ; CHECK-NEXT: .cfi_def_cfa_offset 8
40 ; CHECK-NEXT: .LBB0_6: # %CallStackCheckFailBlk
41 ; CHECK-NEXT: .cfi_def_cfa_offset 16
42 ; CHECK-NEXT: callq __stack_chk_fail@PLT
44 ; DISNOTET-LABEL: _Z7catchesv:
45 ; DISNOTET: # %bb.0: # %entry
46 ; DISNOTET-NEXT: pushq %rax
47 ; DISNOTET-NEXT: .cfi_def_cfa_offset 16
48 ; DISNOTET-NEXT: movq %fs:40, %rax
49 ; DISNOTET-NEXT: movq %rax, (%rsp)
50 ; DISNOTET-NEXT: .Ltmp0:
51 ; DISNOTET-NEXT: xorl %eax, %eax
52 ; DISNOTET-NEXT: xorl %edi, %edi
53 ; DISNOTET-NEXT: xorl %esi, %esi
54 ; DISNOTET-NEXT: xorl %edx, %edx
55 ; DISNOTET-NEXT: callq *%rax
56 ; DISNOTET-NEXT: .Ltmp1:
57 ; DISNOTET-NEXT: # %bb.1: # %invoke.cont
58 ; DISNOTET-NEXT: .Ltmp2:
59 ; DISNOTET-NEXT: xorl %eax, %eax
60 ; DISNOTET-NEXT: xorl %edi, %edi
61 ; DISNOTET-NEXT: callq *%rax
62 ; DISNOTET-NEXT: .Ltmp3:
63 ; DISNOTET-NEXT: # %bb.2: # %invoke.cont2
64 ; DISNOTET-NEXT: .LBB0_3: # %lpad1
65 ; DISNOTET-NEXT: .Ltmp4:
66 ; DISNOTET-NEXT: movq %fs:40, %rax
67 ; DISNOTET-NEXT: cmpq (%rsp), %rax
68 ; DISNOTET-NEXT: jne .LBB0_5
69 ; DISNOTET-NEXT: # %bb.4: # %SP_return
70 ; DISNOTET-NEXT: popq %rax
71 ; DISNOTET-NEXT: .cfi_def_cfa_offset 8
73 ; DISNOTET-NEXT: .LBB0_5: # %CallStackCheckFailBlk
74 ; DISNOTET-NEXT: .cfi_def_cfa_offset 16
75 ; DISNOTET-NEXT: callq __stack_chk_fail@PLT
77 %call = invoke i64 null(i32 0, ptr null, i64 0)
78 to label %invoke.cont unwind label %lpad1
80 invoke.cont: ; preds = %entry
81 invoke void null(i32 0) #1
82 to label %invoke.cont2 unwind label %lpad1
84 invoke.cont2: ; preds = %invoke.cont
87 lpad1: ; preds = %invoke.cont, %entry
88 %0 = landingpad { ptr, i32 }
93 ; uselistorder directives
94 uselistorder ptr null, { 5, 4, 3, 2, 1, 0 }
96 attributes #0 = { sspreq }
97 attributes #1 = { noreturn }