@@ -84,10 +84,10 @@ entry:
84
84
%2 = insertvalue %runtime._string zeroinitializer , ptr %b.data , 0
85
85
%3 = insertvalue %runtime._string %2 , i32 %b.len , 1
86
86
%stackalloc = alloca i8 , align 1
87
- %4 = call i1 @runtime.stringLess (ptr %a.data , i32 %a.len , ptr %b.data , i32 %b.len , ptr undef ) #4
87
+ %4 = call i1 @runtime.stringLess (ptr %a.data , i32 %a.len , ptr %b.data , i32 %b.len , ptr undef ) #5
88
88
%5 = select i1 %4 , %runtime._string %1 , %runtime._string %3
89
89
%6 = extractvalue %runtime._string %5 , 0
90
- call void @runtime.trackPointer (ptr %6 , ptr nonnull %stackalloc , ptr undef ) #4
90
+ call void @runtime.trackPointer (ptr %6 , ptr nonnull %stackalloc , ptr undef ) #5
91
91
ret %runtime._string %5
92
92
}
93
93
@@ -123,30 +123,48 @@ entry:
123
123
%2 = insertvalue %runtime._string zeroinitializer , ptr %b.data , 0
124
124
%3 = insertvalue %runtime._string %2 , i32 %b.len , 1
125
125
%stackalloc = alloca i8 , align 1
126
- %4 = call i1 @runtime.stringLess (ptr %b.data , i32 %b.len , ptr %a.data , i32 %a.len , ptr undef ) #4
126
+ %4 = call i1 @runtime.stringLess (ptr %b.data , i32 %b.len , ptr %a.data , i32 %a.len , ptr undef ) #5
127
127
%5 = select i1 %4 , %runtime._string %1 , %runtime._string %3
128
128
%6 = extractvalue %runtime._string %5 , 0
129
- call void @runtime.trackPointer (ptr %6 , ptr nonnull %stackalloc , ptr undef ) #4
129
+ call void @runtime.trackPointer (ptr %6 , ptr nonnull %stackalloc , ptr undef ) #5
130
130
ret %runtime._string %5
131
131
}
132
132
133
+ ; Function Attrs: nounwind
134
+ define hidden void @main.clearSlice (ptr %s.data , i32 %s.len , i32 %s.cap , ptr %context ) unnamed_addr #2 {
135
+ entry:
136
+ %0 = shl i32 %s.len , 2
137
+ call void @llvm.memset.p0.i32 (ptr align 4 %s.data , i8 0 , i32 %0 , i1 false )
138
+ ret void
139
+ }
140
+
141
+ ; Function Attrs: argmemonly nocallback nofree nounwind willreturn writeonly
142
+ declare void @llvm.memset.p0.i32 (ptr nocapture writeonly , i8 , i32 , i1 immarg) #3
143
+
144
+ ; Function Attrs: nounwind
145
+ define hidden void @main.clearZeroSizedSlice (ptr %s.data , i32 %s.len , i32 %s.cap , ptr %context ) unnamed_addr #2 {
146
+ entry:
147
+ ret void
148
+ }
149
+
133
150
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
134
- declare i32 @llvm.smin.i32 (i32 , i32 ) #3
151
+ declare i32 @llvm.smin.i32 (i32 , i32 ) #4
135
152
136
153
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
137
- declare i8 @llvm.umin.i8 (i8 , i8 ) #3
154
+ declare i8 @llvm.umin.i8 (i8 , i8 ) #4
138
155
139
156
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
140
- declare i32 @llvm.umin.i32 (i32 , i32 ) #3
157
+ declare i32 @llvm.umin.i32 (i32 , i32 ) #4
141
158
142
159
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
143
- declare i32 @llvm.smax.i32 (i32 , i32 ) #3
160
+ declare i32 @llvm.smax.i32 (i32 , i32 ) #4
144
161
145
162
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
146
- declare i32 @llvm.umax.i32 (i32 , i32 ) #3
163
+ declare i32 @llvm.umax.i32 (i32 , i32 ) #4
147
164
148
165
attributes #0 = { allockind("alloc,zeroed" ) allocsize(0 ) "alloc-family" ="runtime.alloc" "target-features" ="+bulk-memory,+nontrapping-fptoint,+sign-ext" }
149
166
attributes #1 = { "target-features" ="+bulk-memory,+nontrapping-fptoint,+sign-ext" }
150
167
attributes #2 = { nounwind "target-features" ="+bulk-memory,+nontrapping-fptoint,+sign-ext" }
151
- attributes #3 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
152
- attributes #4 = { nounwind }
168
+ attributes #3 = { argmemonly nocallback nofree nounwind willreturn writeonly }
169
+ attributes #4 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
170
+ attributes #5 = { nounwind }
0 commit comments