File: 2010-06-21-nondarwin-tc.ll

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (138 lines) | stat: -rw-r--r-- 7,647 bytes parent folder | download | duplicates (12)
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
; RUN: llc < %s -mtriple=armv4t-unknown-linux-gnueabi  | FileCheck %s
; PR 7433
; XFAIL: *

%0 = type { ptr, ptr }
%1 = type { ptr, ptr, ptr }
%"class.llvm::Record" = type { i32, %"class.std::basic_string", %"class.llvm::SMLoc", %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%"class.llvm::RecordVal" = type { %"class.std::basic_string", ptr, i32, ptr }
%"class.llvm::SMLoc" = type { ptr }
%"class.llvm::StringInit" = type { [8 x i8], %"class.std::basic_string" }
%"class.std::basic_string" = type { %"class.llvm::SMLoc" }
%"class.std::vector" = type { [12 x i8] }
%"struct.llvm::Init" = type { ptr }

@_ZTIN4llvm5RecTyE = external constant %0         ; <ptr> [#uses=1]
@_ZTIN4llvm4InitE = external constant %0          ; <ptr> [#uses=1]
@_ZTIN4llvm11RecordRecTyE = external constant %1  ; <ptr> [#uses=1]
@.str8 = external constant [47 x i8]              ; <ptr> [#uses=1]
@_ZTIN4llvm9UnsetInitE = external constant %1     ; <ptr> [#uses=1]
@.str51 = external constant [45 x i8]             ; <ptr> [#uses=1]
@__PRETTY_FUNCTION__._ZNK4llvm7VarInit12getFieldInitERNS_6RecordEPKNS_9RecordValERKSs = external constant [116 x i8] ; <ptr> [#uses=1]

@_ZN4llvm9RecordValC1ERKSsPNS_5RecTyEj = alias void (ptr, ptr, ptr, i32), ptr @_ZN4llvm9RecordValC2ERKSsPNS_5RecTyEj ; <ptr> [#uses=0]

declare ptr @__dynamic_cast(ptr, ptr, ptr, i32)

declare void @__assert_fail(ptr, ptr, i32, ptr) noreturn

declare void @_ZN4llvm9RecordValC2ERKSsPNS_5RecTyEj(ptr, ptr, ptr, i32) align 2

define ptr @_ZNK4llvm7VarInit12getFieldInitERNS_6RecordEPKNS_9RecordValERKSs(ptr %this, ptr %R, ptr %RV, ptr %FieldName) align 2 {
;CHECK:  ldmia sp!, {r4, r5, r6, r7, r8, lr}
;CHECK:  bx  r12  @ TAILCALL
entry:
  %.loc = alloca i32                              ; <ptr> [#uses=2]
  %tmp.i = getelementptr inbounds %"class.llvm::StringInit", ptr %this, i32 0, i32 0, i32 4 ; <ptr> [#uses=1]
  %tmp2.i = load ptr, ptr %tmp.i        ; <ptr> [#uses=2]
  %0 = icmp eq ptr %tmp2.i, null ; <i1> [#uses=1]
  br i1 %0, label %entry.return_crit_edge, label %tmpbb

entry.return_crit_edge:                           ; preds = %entry
  br label %return

tmpbb:                                            ; preds = %entry
  %1 = tail call ptr @__dynamic_cast(ptr %tmp2.i, ptr @_ZTIN4llvm5RecTyE, ptr @_ZTIN4llvm11RecordRecTyE, i32 -1) ; <ptr> [#uses=1]
  %phitmp = icmp eq ptr %1, null                  ; <i1> [#uses=1]
  br i1 %phitmp, label %.return_crit_edge, label %if.then

.return_crit_edge:                                ; preds = %tmpbb
  br label %return

if.then:                                          ; preds = %tmpbb
  %tmp2.i.i.i.i = getelementptr inbounds %"class.llvm::StringInit", ptr %this, i32 0, i32 1, i32 0, i32 0 ; <ptr> [#uses=1]
  %tmp3.i.i.i.i = load ptr, ptr %tmp2.i.i.i.i         ; <ptr> [#uses=2]
  %arrayidx.i.i.i.i = getelementptr inbounds i8, ptr %tmp3.i.i.i.i, i32 -12 ; <ptr> [#uses=1]
  %tmp2.i.i.i = load i32, ptr %arrayidx.i.i.i.i              ; <i32> [#uses=1]
  %tmp.i5 = getelementptr inbounds %"class.llvm::Record", ptr %R, i32 0, i32 4 ; <ptr> [#uses=1]
  %tmp2.i.i = getelementptr inbounds %"class.llvm::Record", ptr %R, i32 0, i32 4, i32 0, i32 4 ; <ptr> [#uses=1]
  %tmp3.i.i6 = load ptr, ptr %tmp2.i.i ; <ptr> [#uses=1]
  %tmp6.i.i = load ptr, ptr %tmp.i5 ; <ptr> [#uses=5]
  %sub.ptr.lhs.cast.i.i = ptrtoint ptr %tmp3.i.i6 to i32 ; <i32> [#uses=1]
  %sub.ptr.rhs.cast.i.i = ptrtoint ptr %tmp6.i.i to i32 ; <i32> [#uses=1]
  %sub.ptr.sub.i.i = sub i32 %sub.ptr.lhs.cast.i.i, %sub.ptr.rhs.cast.i.i ; <i32> [#uses=1]
  %sub.ptr.div.i.i = ashr i32 %sub.ptr.sub.i.i, 4 ; <i32> [#uses=1]
  br label %codeRepl

codeRepl:                                         ; preds = %if.then
  %targetBlock = call i1 @_ZNK4llvm7VarInit12getFieldInitERNS_6RecordEPKNS_9RecordValERKSs_for.cond.i(i32 %sub.ptr.div.i.i, ptr %tmp6.i.i, i32 %tmp2.i.i.i, ptr %tmp3.i.i.i.i, ptr %.loc) ; <i1> [#uses=1]
  %.reload = load i32, ptr %.loc                      ; <i32> [#uses=3]
  br i1 %targetBlock, label %for.cond.i.return_crit_edge, label %_ZN4llvm6Record8getValueENS_9StringRefE.exit

for.cond.i.return_crit_edge:                      ; preds = %codeRepl
  br label %return

_ZN4llvm6Record8getValueENS_9StringRefE.exit:     ; preds = %codeRepl
  %add.ptr.i.i = getelementptr inbounds %"class.llvm::RecordVal", ptr %tmp6.i.i, i32 %.reload ; <ptr> [#uses=2]
  %tobool5 = icmp eq ptr %add.ptr.i.i, null ; <i1> [#uses=1]
  br i1 %tobool5, label %_ZN4llvm6Record8getValueENS_9StringRefE.exit.return_crit_edge, label %if.then6

_ZN4llvm6Record8getValueENS_9StringRefE.exit.return_crit_edge: ; preds = %_ZN4llvm6Record8getValueENS_9StringRefE.exit
  br label %return

if.then6:                                         ; preds = %_ZN4llvm6Record8getValueENS_9StringRefE.exit
  %cmp = icmp eq ptr %add.ptr.i.i, %RV ; <i1> [#uses=1]
  br i1 %cmp, label %if.then6.if.end_crit_edge, label %land.lhs.true

if.then6.if.end_crit_edge:                        ; preds = %if.then6
  br label %if.end

land.lhs.true:                                    ; preds = %if.then6
  %tobool10 = icmp eq ptr %RV, null ; <i1> [#uses=1]
  br i1 %tobool10, label %lor.lhs.false, label %land.lhs.true.return_crit_edge

land.lhs.true.return_crit_edge:                   ; preds = %land.lhs.true
  br label %return

lor.lhs.false:                                    ; preds = %land.lhs.true
  %tmp.i3 = getelementptr inbounds %"class.llvm::RecordVal", ptr %tmp6.i.i, i32 %.reload, i32 3 ; <ptr> [#uses=1]
  %tmp2.i4 = load ptr, ptr %tmp.i3  ; <ptr> [#uses=2]
  %2 = icmp eq ptr %tmp2.i4, null ; <i1> [#uses=1]
  br i1 %2, label %lor.lhs.false.if.end_crit_edge, label %tmpbb1

lor.lhs.false.if.end_crit_edge:                   ; preds = %lor.lhs.false
  br label %if.end

tmpbb1:                                           ; preds = %lor.lhs.false
  %3 = tail call ptr @__dynamic_cast(ptr %tmp2.i4, ptr @_ZTIN4llvm4InitE, ptr @_ZTIN4llvm9UnsetInitE, i32 -1) ; <ptr> [#uses=1]
  %phitmp32 = icmp eq ptr %3, null                ; <i1> [#uses=1]
  br i1 %phitmp32, label %.if.end_crit_edge, label %.return_crit_edge1

.return_crit_edge1:                               ; preds = %tmpbb1
  br label %return

.if.end_crit_edge:                                ; preds = %tmpbb1
  br label %if.end

if.end:                                           ; preds = %.if.end_crit_edge, %lor.lhs.false.if.end_crit_edge, %if.then6.if.end_crit_edge
  %tmp.i1 = getelementptr inbounds %"class.llvm::RecordVal", ptr %tmp6.i.i, i32 %.reload, i32 3 ; <ptr> [#uses=1]
  %tmp2.i2 = load ptr, ptr %tmp.i1  ; <ptr> [#uses=3]
  %cmp19 = icmp eq ptr %tmp2.i2, %this ; <i1> [#uses=1]
  br i1 %cmp19, label %cond.false, label %cond.end

cond.false:                                       ; preds = %if.end
  tail call void @__assert_fail(ptr @.str51, ptr @.str8, i32 1141, ptr @__PRETTY_FUNCTION__._ZNK4llvm7VarInit12getFieldInitERNS_6RecordEPKNS_9RecordValERKSs) noreturn
  unreachable

cond.end:                                         ; preds = %if.end
  %4 = load ptr, ptr %tmp2.i2 ; <ptr> [#uses=1]
  %vfn = getelementptr inbounds ptr, ptr %4, i32 8 ; <ptr> [#uses=1]
  %5 = load ptr, ptr %vfn ; <ptr> [#uses=1]
  %call25 = tail call ptr %5(ptr %tmp2.i2, ptr %R, ptr %RV, ptr %FieldName) ; <ptr> [#uses=1]
  ret ptr %call25

return:                                           ; preds = %.return_crit_edge1, %land.lhs.true.return_crit_edge, %_ZN4llvm6Record8getValueENS_9StringRefE.exit.return_crit_edge, %for.cond.i.return_crit_edge, %.return_crit_edge, %entry.return_crit_edge
  ret ptr null
}

declare i1 @_ZNK4llvm7VarInit12getFieldInitERNS_6RecordEPKNS_9RecordValERKSs_for.cond.i(i32, ptr, i32, ptr, ptr)