reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    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
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
; RUN: llc -march=hexagon < %s | FileCheck %s
; CHECK: .cfi_offset r31, -4
; CHECK: .cfi_offset r30, -8
; CHECK: .cfi_offset r17, -12
; CHECK: .cfi_offset r16, -16

@g0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@g1 = external constant i8*
@g2 = private unnamed_addr constant [15 x i8] c"blah blah blah\00", align 1
@g3 = external constant i8*
@g4 = private unnamed_addr constant [2 x i8] c"{\00"
@g5 = private unnamed_addr constant [2 x i8] c"}\00"
@g6 = private unnamed_addr constant [27 x i8] c"FAIL:Unexpected exception.\00"

; Function Attrs: nounwind
declare i32 @f0(i8* nocapture readonly, ...) #0

; Function Attrs: nounwind
define void @f1(i32 %a0) #0 {
b0:
  %v0 = tail call i32 (i8*, ...) @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i32 %a0)
  ret void
}

define i32 @f2(i32 %a0, i8** nocapture readnone %a1) personality i8* bitcast (i32 (...)* @f5 to i8*) {
b0:
  %v0 = tail call i32 (i8*, ...) @f0(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @g0, i32 0, i32 0), i32 %a0) #0
  %v1 = tail call i32 @f8(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @g4, i32 0, i32 0)) #0
  %v2 = tail call i8* @f3(i32 4) #0
  %v3 = bitcast i8* %v2 to i8**
  store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @g2, i32 0, i32 0), i8** %v3, align 4, !tbaa !0
  invoke void @f4(i8* %v2, i8* bitcast (i8** @g1 to i8*), i8* null) #2
          to label %b9 unwind label %b1

b1:                                               ; preds = %b0
  %v4 = landingpad { i8*, i32 }
          catch i8* bitcast (i8** @g1 to i8*)
          catch i8* null
  %v5 = extractvalue { i8*, i32 } %v4, 0
  %v6 = extractvalue { i8*, i32 } %v4, 1
  %v7 = tail call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @g1 to i8*)) #0
  %v8 = icmp eq i32 %v6, %v7
  %v9 = tail call i8* @f6(i8* %v5) #0
  br i1 %v8, label %b2, label %b3

b2:                                               ; preds = %b1
  tail call void @f7() #0
  br label %b4

b3:                                               ; preds = %b1
  %v10 = tail call i32 @f8(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @g6, i32 0, i32 0))
  tail call void @f7()
  br label %b4

b4:                                               ; preds = %b3, %b2
  %v11 = tail call i32 @f8(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @g5, i32 0, i32 0)) #0
  %v12 = tail call i32 @f8(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @g4, i32 0, i32 0)) #0
  %v13 = tail call i8* @f3(i32 4) #0
  %v14 = bitcast i8* %v13 to i32*
  store i32 777, i32* %v14, align 4, !tbaa !4
  invoke void @f4(i8* %v13, i8* bitcast (i8** @g3 to i8*), i8* null) #2
          to label %b9 unwind label %b5

b5:                                               ; preds = %b4
  %v15 = landingpad { i8*, i32 }
          catch i8* bitcast (i8** @g3 to i8*)
          catch i8* null
  %v16 = extractvalue { i8*, i32 } %v15, 0
  %v17 = extractvalue { i8*, i32 } %v15, 1
  %v18 = tail call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @g3 to i8*)) #0
  %v19 = icmp eq i32 %v17, %v18
  %v20 = tail call i8* @f6(i8* %v16) #0
  br i1 %v19, label %b6, label %b7

b6:                                               ; preds = %b5
  tail call void @f7() #0
  br label %b8

b7:                                               ; preds = %b5
  %v21 = tail call i32 @f8(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @g6, i32 0, i32 0))
  tail call void @f7()
  br label %b8

b8:                                               ; preds = %b7, %b6
  %v22 = tail call i32 @f8(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @g5, i32 0, i32 0)) #0
  ret i32 0

b9:                                               ; preds = %b4, %b0
  unreachable
}

declare i8* @f3(i32)

declare void @f4(i8*, i8*, i8*)

declare i32 @f5(...)

; Function Attrs: nounwind readnone
declare i32 @llvm.eh.typeid.for(i8*) #1

declare i8* @f6(i8*)

declare void @f7()

; Function Attrs: nounwind
declare i32 @f8(i8* nocapture readonly) #0

attributes #0 = { nounwind }
attributes #1 = { nounwind readnone }
attributes #2 = { noreturn }

!0 = !{!1, !1, i64 0}
!1 = !{!"any pointer", !2, i64 0}
!2 = !{!"omnipotent char", !3, i64 0}
!3 = !{!"Simple C/C++ TBAA"}
!4 = !{!5, !5, i64 0}
!5 = !{!"int", !2, i64 0}