-
-
Save nikic/66478e84510d35b763a6b99a2aefa508 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'test.617d8d07-cgu.0' | |
source_filename = "test.617d8d07-cgu.0" | |
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20" | |
target triple = "wasm32-unknown-unknown" | |
%"core::option::Option<usize>::Some" = type { [1 x i32], i32 } | |
%"core::panic::location::Location" = type { { [0 x i8]*, i32 }, i32, i32 } | |
%"core::ops::control_flow::ControlFlow<core::option::Option<core::convert::Infallible>, [f32; 0]>::Continue" = type { [1 x i32], [0 x float] } | |
@alloc13 = private unnamed_addr constant <{ [7 x i8] }> <{ [7 x i8] c"test.rs" }>, align 1 | |
@alloc11 = private unnamed_addr constant <{ i8*, [12 x i8] }> <{ i8* getelementptr inbounds (<{ [7 x i8] }>, <{ [7 x i8] }>* @alloc13, i32 0, i32 0, i32 0), [12 x i8] c"\07\00\00\00\0F\00\00\00\11\00\00\00" }>, align 4 | |
@alloc12 = private unnamed_addr constant <{ [15 x i8] }> <{ [15 x i8] c"not implemented" }>, align 1 | |
@alloc14 = private unnamed_addr constant <{ i8*, [12 x i8] }> <{ i8* getelementptr inbounds (<{ [7 x i8] }>, <{ [7 x i8] }>* @alloc13, i32 0, i32 0, i32 0), [12 x i8] c"\07\00\00\00\18\00\00\00\05\00\00\00" }>, align 4 | |
@alloc15 = private unnamed_addr constant <{ [75 x i8] }> <{ [75 x i8] c"/rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ptr/mod.rs" }>, align 1 | |
@alloc16 = private unnamed_addr constant <{ i8*, [12 x i8] }> <{ i8* getelementptr inbounds (<{ [75 x i8] }>, <{ [75 x i8] }>* @alloc15, i32 0, i32 0, i32 0), [12 x i8] c"K\00\00\00\BE\02\00\00\0D\00\00\00" }>, align 4 | |
@vtable.0 = private unnamed_addr constant <{ i8*, [8 x i8], i8*, i8*, i8*, [0 x i8] }> <{ i8* bitcast (void (i32**)* @"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h50a5f62cd705d7c8E" to i8*), [8 x i8] c"\04\00\00\00\04\00\00\00", i8* bitcast (i32 (i32**)* @"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h1b1b2042e5c81a8dE" to i8*), i8* bitcast (i32 (i32**)* @"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h0e09ea9fc9244c74E" to i8*), i8* bitcast (i32 (i32**)* @"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h0e09ea9fc9244c74E" to i8*), [0 x i8] zeroinitializer }>, align 4 | |
; core::ops::function::FnOnce::call_once{{vtable.shim}} | |
; Function Attrs: inlinehint nounwind | |
define internal i32 @"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h1b1b2042e5c81a8dE"(i32** %_1) unnamed_addr #0 { | |
start: | |
%_2 = alloca {}, align 1 | |
%0 = load i32*, i32** %_1, align 4, !nonnull !0 | |
; call core::ops::function::FnOnce::call_once | |
%1 = call i32 @_ZN4core3ops8function6FnOnce9call_once17h926edc58809cffbfE(i32* nonnull %0) #9 | |
br label %bb1 | |
bb1: ; preds = %start | |
ret i32 %1 | |
} | |
; core::ops::function::FnOnce::call_once | |
; Function Attrs: inlinehint nounwind | |
define internal void @_ZN4core3ops8function6FnOnce9call_once17h2d1e791c02f388aeE(void ()* nonnull %_1) unnamed_addr #0 { | |
start: | |
%_2 = alloca {}, align 1 | |
call void %_1() #9 | |
br label %bb1 | |
bb1: ; preds = %start | |
ret void | |
} | |
; core::ops::function::FnOnce::call_once | |
; Function Attrs: inlinehint nounwind | |
define internal i32 @_ZN4core3ops8function6FnOnce9call_once17h926edc58809cffbfE(i32* nonnull %0) unnamed_addr #0 { | |
start: | |
%_2 = alloca {}, align 1 | |
%_1 = alloca i32*, align 4 | |
store i32* %0, i32** %_1, align 4 | |
; call std::rt::lang_start::{{closure}} | |
%1 = call i32 @"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h0e09ea9fc9244c74E"(i32** noalias noundef readonly align 4 dereferenceable(4) %_1) #9 | |
br label %bb1 | |
bb1: ; preds = %start | |
br label %bb2 | |
bb2: ; preds = %bb1 | |
ret i32 %1 | |
} | |
; core::ptr::drop_in_place<std::rt::lang_start<()>::{{closure}}> | |
; Function Attrs: inlinehint nounwind | |
define internal void @"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h50a5f62cd705d7c8E"(i32** %_1) unnamed_addr #0 { | |
start: | |
ret void | |
} | |
; test::explode | |
; Function Attrs: nounwind | |
define internal noundef zeroext i1 @_ZN4test7explode17h9778b0358a625b31E(i32* noalias noundef readonly align 4 dereferenceable(4) %0) unnamed_addr #1 { | |
start: | |
%_7 = alloca { [0 x {}] }, align 1 | |
%_4 = alloca i32, align 4 | |
%1 = alloca i8, align 1 | |
%node_map = alloca i32*, align 4 | |
store i32* %0, i32** %node_map, align 4 | |
; call test::conjure | |
call void @_ZN4test7conjure17h43c88a053f619de3E() #9 | |
br label %bb1 | |
bb1: ; preds = %start | |
%2 = bitcast i32* %_4 to i8* | |
call void @llvm.lifetime.start.p0i8(i64 4, i8* %2) | |
%3 = bitcast { [0 x {}] }* %_7 to [0 x {}]* | |
; call test::Layout<_>::new::{{closure}} | |
%_5 = call i32 @"_ZN4test15Layout$LT$_$GT$3new28_$u7b$$u7b$closure$u7d$$u7d$17hedca5e990a88dd94E"(i32** noalias noundef readonly align 4 dereferenceable(4) %node_map) #9, !range !1 | |
br label %bb2 | |
bb2: ; preds = %bb1 | |
; call <core::option::Option<T> as core::ops::try_trait::Try>::branch | |
%4 = call i32 @"_ZN75_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..ops..try_trait..Try$GT$6branch17ha7d4f7d239881f1eE"(i32 %_5) #9, !range !1 | |
store i32 %4, i32* %_4, align 4 | |
br label %bb3 | |
bb3: ; preds = %bb2 | |
%_9 = load i32, i32* %_4, align 4, !range !1 | |
switch i32 %_9, label %bb5 [ | |
i32 0, label %bb4 | |
i32 1, label %bb6 | |
] | |
bb5: ; preds = %bb3 | |
unreachable | |
bb4: ; preds = %bb3 | |
br label %bb8 | |
bb6: ; preds = %bb3 | |
; call <core::option::Option<T> as core::ops::try_trait::FromResidual>::from_residual | |
%5 = call noundef zeroext i1 @"_ZN84_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..ops..try_trait..FromResidual$GT$13from_residual17h49383399f2f07752E"() #9 | |
%6 = zext i1 %5 to i8 | |
store i8 %6, i8* %1, align 1 | |
br label %bb7 | |
bb7: ; preds = %bb6 | |
%7 = bitcast i32* %_4 to i8* | |
call void @llvm.lifetime.end.p0i8(i64 4, i8* %7) | |
br label %bb9 | |
bb9: ; preds = %bb8, %bb7 | |
%8 = load i8, i8* %1, align 1, !range !2 | |
%9 = trunc i8 %8 to i1 | |
ret i1 %9 | |
bb8: ; preds = %bb4 | |
%10 = bitcast i32* %_4 to i8* | |
call void @llvm.lifetime.end.p0i8(i64 4, i8* %10) | |
store i8 0, i8* %1, align 1 | |
br label %bb9 | |
} | |
; test::Layout<_>::new | |
; Function Attrs: nounwind | |
define internal void @"_ZN4test15Layout$LT$_$GT$3new17h06f197e772ca0730E"() unnamed_addr #1 { | |
start: | |
%node_map = alloca i32*, align 4 | |
%i = alloca i32, align 4 | |
%_4 = alloca { i32, i32 }, align 4 | |
%iter = alloca { i32, i32 }, align 4 | |
%_2 = alloca { i32, i32 }, align 4 | |
%0 = bitcast { i32, i32 }* %_2 to i8* | |
call void @llvm.lifetime.start.p0i8(i64 8, i8* %0) | |
%1 = bitcast { i32, i32 }* %_2 to i32* | |
store i32 0, i32* %1, align 4 | |
%2 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %_2, i32 0, i32 1 | |
store i32 0, i32* %2, align 4 | |
%3 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %_2, i32 0, i32 0 | |
%4 = load i32, i32* %3, align 4 | |
%5 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %_2, i32 0, i32 1 | |
%6 = load i32, i32* %5, align 4 | |
; call <I as core::iter::traits::collect::IntoIterator>::into_iter | |
%7 = call { i32, i32 } @"_ZN63_$LT$I$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17h36968a9a29397720E"(i32 %4, i32 %6) #9 | |
%_1.0 = extractvalue { i32, i32 } %7, 0 | |
%_1.1 = extractvalue { i32, i32 } %7, 1 | |
br label %bb1 | |
bb1: ; preds = %start | |
%8 = bitcast { i32, i32 }* %_2 to i8* | |
call void @llvm.lifetime.end.p0i8(i64 8, i8* %8) | |
%9 = bitcast { i32, i32 }* %iter to i8* | |
call void @llvm.lifetime.start.p0i8(i64 8, i8* %9) | |
%10 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %iter, i32 0, i32 0 | |
store i32 %_1.0, i32* %10, align 4 | |
%11 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %iter, i32 0, i32 1 | |
store i32 %_1.1, i32* %11, align 4 | |
br label %bb2 | |
bb2: ; preds = %bb7, %bb1 | |
%12 = bitcast { i32, i32 }* %_4 to i8* | |
call void @llvm.lifetime.start.p0i8(i64 8, i8* %12) | |
; call core::iter::range::<impl core::iter::traits::iterator::Iterator for core::ops::range::Range<A>>::next | |
%13 = call { i32, i32 } @"_ZN4core4iter5range101_$LT$impl$u20$core..iter..traits..iterator..Iterator$u20$for$u20$core..ops..range..Range$LT$A$GT$$GT$4next17h56107ea2f77c9d3cE"({ i32, i32 }* noalias noundef align 4 dereferenceable(8) %iter) #9 | |
store { i32, i32 } %13, { i32, i32 }* %_4, align 4 | |
br label %bb3 | |
bb3: ; preds = %bb2 | |
%14 = bitcast { i32, i32 }* %_4 to i32* | |
%_7 = load i32, i32* %14, align 4, !range !1 | |
switch i32 %_7, label %bb5 [ | |
i32 0, label %bb6 | |
i32 1, label %bb4 | |
] | |
bb5: ; preds = %bb3 | |
unreachable | |
bb6: ; preds = %bb3 | |
%15 = bitcast { i32, i32 }* %_4 to i8* | |
call void @llvm.lifetime.end.p0i8(i64 8, i8* %15) | |
%16 = bitcast { i32, i32 }* %iter to i8* | |
call void @llvm.lifetime.end.p0i8(i64 8, i8* %16) | |
ret void | |
bb4: ; preds = %bb3 | |
%17 = bitcast i32* %i to i8* | |
call void @llvm.lifetime.start.p0i8(i64 4, i8* %17) | |
%18 = bitcast { i32, i32 }* %_4 to %"core::option::Option<usize>::Some"* | |
%19 = getelementptr inbounds %"core::option::Option<usize>::Some", %"core::option::Option<usize>::Some"* %18, i32 0, i32 1 | |
%20 = load i32, i32* %19, align 4 | |
store i32 %20, i32* %i, align 4 | |
%21 = bitcast i32** %node_map to i8* | |
call void @llvm.lifetime.start.p0i8(i64 4, i8* %21) | |
store i32* %i, i32** %node_map, align 4 | |
%_12 = load i32*, i32** %node_map, align 4, !nonnull !0 | |
; call test::explode | |
%_11 = call noundef zeroext i1 @_ZN4test7explode17h9778b0358a625b31E(i32* noalias noundef readonly align 4 dereferenceable(4) %_12) #9 | |
br label %bb7 | |
bb7: ; preds = %bb4 | |
%22 = bitcast i32** %node_map to i8* | |
call void @llvm.lifetime.end.p0i8(i64 4, i8* %22) | |
%23 = bitcast i32* %i to i8* | |
call void @llvm.lifetime.end.p0i8(i64 4, i8* %23) | |
%24 = bitcast { i32, i32 }* %_4 to i8* | |
call void @llvm.lifetime.end.p0i8(i64 8, i8* %24) | |
br label %bb2 | |
} | |
; test::Layout<_>::new::{{closure}} | |
; Function Attrs: inlinehint nounwind | |
define internal i32 @"_ZN4test15Layout$LT$_$GT$3new28_$u7b$$u7b$closure$u7d$$u7d$17hedca5e990a88dd94E"(i32** noalias noundef readonly align 4 dereferenceable(4) %_1) unnamed_addr #0 { | |
start: | |
%0 = alloca i32, align 4 | |
%1 = load i32*, i32** %_1, align 4, !nonnull !0 | |
%_3 = load i32, i32* %1, align 4 | |
%_5 = icmp ult i32 %_3, 0 | |
%2 = call i1 @llvm.expect.i1(i1 %_5, i1 true) | |
br i1 %2, label %bb1, label %panic | |
bb1: ; preds = %start | |
store i32 0, i32* %0, align 4 | |
%3 = load i32, i32* %0, align 4, !range !1 | |
ret i32 %3 | |
panic: ; preds = %start | |
; call core::panicking::panic_bounds_check | |
call void @_ZN4core9panicking18panic_bounds_check17he4f030d1ec9ef522E(i32 %_3, i32 0, %"core::panic::location::Location"* noalias noundef readonly align 4 dereferenceable(16) bitcast (<{ i8*, [12 x i8] }>* @alloc11 to %"core::panic::location::Location"*)) #10 | |
unreachable | |
} | |
; test::conjure | |
; Function Attrs: nounwind | |
define internal void @_ZN4test7conjure17h43c88a053f619de3E() unnamed_addr #1 { | |
start: | |
; call core::panicking::panic | |
call void @_ZN4core9panicking5panic17he88f1b1582b09c8cE([0 x i8]* noalias noundef nonnull readonly align 1 bitcast (<{ [15 x i8] }>* @alloc12 to [0 x i8]*), i32 15, %"core::panic::location::Location"* noalias noundef readonly align 4 dereferenceable(16) bitcast (<{ i8*, [12 x i8] }>* @alloc14 to %"core::panic::location::Location"*)) #10 | |
unreachable | |
} | |
; test::main | |
; Function Attrs: nounwind | |
define internal void @_ZN4test4main17h90cdca1c5e05c042E() unnamed_addr #1 { | |
start: | |
; call test::Layout<_>::new | |
call void @"_ZN4test15Layout$LT$_$GT$3new17h06f197e772ca0730E"() #9 | |
br label %bb1 | |
bb1: ; preds = %start | |
ret void | |
} | |
; core::hint::black_box | |
; Function Attrs: inlinehint nounwind | |
define internal void @_ZN4core4hint9black_box17h8632ad9a839faf85E() unnamed_addr #0 { | |
start: | |
call void asm sideeffect "", "r,~{memory}"({}* undef), !srcloc !3 | |
br label %bb1 | |
bb1: ; preds = %start | |
ret void | |
} | |
; core::mem::manually_drop::ManuallyDrop<T>::into_inner | |
; Function Attrs: alwaysinline nounwind | |
define internal i32 @"_ZN4core3mem13manually_drop21ManuallyDrop$LT$T$GT$10into_inner17h133c5eab8386dcc3E"(i32 %slot) unnamed_addr #2 { | |
start: | |
ret i32 %slot | |
} | |
; core::mem::maybe_uninit::MaybeUninit<T>::uninit | |
; Function Attrs: alwaysinline nounwind | |
define internal i32 @"_ZN4core3mem12maybe_uninit20MaybeUninit$LT$T$GT$6uninit17hbbea5495346a0be7E"() unnamed_addr #2 { | |
start: | |
%0 = alloca i32, align 4 | |
%1 = bitcast i32* %0 to {}* | |
%2 = load i32, i32* %0, align 4 | |
ret i32 %2 | |
} | |
; core::mem::maybe_uninit::MaybeUninit<T>::as_mut_ptr | |
; Function Attrs: alwaysinline nounwind | |
define internal i32* @"_ZN4core3mem12maybe_uninit20MaybeUninit$LT$T$GT$10as_mut_ptr17hbfaaaa7afa590bb7E"(i32* noalias noundef align 4 dereferenceable(4) %self) unnamed_addr #2 { | |
start: | |
ret i32* %self | |
} | |
; core::mem::maybe_uninit::MaybeUninit<T>::assume_init | |
; Function Attrs: alwaysinline nounwind | |
define internal i32 @"_ZN4core3mem12maybe_uninit20MaybeUninit$LT$T$GT$11assume_init17hf3f59be5d3bc569cE"(i32 %self, %"core::panic::location::Location"* noalias noundef readonly align 4 dereferenceable(16) %0) unnamed_addr #2 { | |
start: | |
br label %bb1 | |
bb1: ; preds = %start | |
; call core::mem::manually_drop::ManuallyDrop<T>::into_inner | |
%1 = call i32 @"_ZN4core3mem13manually_drop21ManuallyDrop$LT$T$GT$10into_inner17h133c5eab8386dcc3E"(i32 %self) #9 | |
br label %bb2 | |
bb2: ; preds = %bb1 | |
ret i32 %1 | |
} | |
; core::mem::replace | |
; Function Attrs: inlinehint nounwind | |
define internal i32 @_ZN4core3mem7replace17h7402ef054db8bd7cE(i32* noalias noundef align 4 dereferenceable(4) %dest, i32 %src) unnamed_addr #0 { | |
start: | |
; call core::ptr::read | |
%result = call i32 @_ZN4core3ptr4read17hd52421e37e4dcf8bE(i32* %dest) #9 | |
br label %bb1 | |
bb1: ; preds = %start | |
; call core::ptr::write | |
call void @_ZN4core3ptr5write17h5b45f16f1f3c5541E(i32* %dest, i32 %src) #9 | |
br label %bb2 | |
bb2: ; preds = %bb1 | |
ret i32 %result | |
} | |
; core::ptr::read | |
; Function Attrs: inlinehint nounwind | |
define internal i32 @_ZN4core3ptr4read17hd52421e37e4dcf8bE(i32* %src) unnamed_addr #0 { | |
start: | |
%tmp = alloca i32, align 4 | |
%0 = bitcast i32* %tmp to i8* | |
call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) | |
; call core::mem::maybe_uninit::MaybeUninit<T>::uninit | |
%1 = call i32 @"_ZN4core3mem12maybe_uninit20MaybeUninit$LT$T$GT$6uninit17hbbea5495346a0be7E"() #9 | |
store i32 %1, i32* %tmp, align 4 | |
br label %bb1 | |
bb1: ; preds = %start | |
; call core::mem::maybe_uninit::MaybeUninit<T>::as_mut_ptr | |
%_4 = call i32* @"_ZN4core3mem12maybe_uninit20MaybeUninit$LT$T$GT$10as_mut_ptr17hbfaaaa7afa590bb7E"(i32* noalias noundef align 4 dereferenceable(4) %tmp) #9 | |
br label %bb2 | |
bb2: ; preds = %bb1 | |
%2 = bitcast i32* %_4 to i8* | |
%3 = bitcast i32* %src to i8* | |
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %2, i8* align 4 %3, i32 4, i1 false) | |
%_6 = load i32, i32* %tmp, align 4 | |
; call core::mem::maybe_uninit::MaybeUninit<T>::assume_init | |
%4 = call i32 @"_ZN4core3mem12maybe_uninit20MaybeUninit$LT$T$GT$11assume_init17hf3f59be5d3bc569cE"(i32 %_6, %"core::panic::location::Location"* noalias noundef readonly align 4 dereferenceable(16) bitcast (<{ i8*, [12 x i8] }>* @alloc16 to %"core::panic::location::Location"*)) #9 | |
br label %bb3 | |
bb3: ; preds = %bb2 | |
%5 = bitcast i32* %tmp to i8* | |
call void @llvm.lifetime.end.p0i8(i64 4, i8* %5) | |
ret i32 %4 | |
} | |
; core::ptr::write | |
; Function Attrs: inlinehint nounwind | |
define internal void @_ZN4core3ptr5write17h5b45f16f1f3c5541E(i32* %dst, i32 %0) unnamed_addr #0 { | |
start: | |
%src = alloca i32, align 4 | |
store i32 %0, i32* %src, align 4 | |
%1 = bitcast i32* %dst to i8* | |
%2 = bitcast i32* %src to i8* | |
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %1, i8* align 4 %2, i32 4, i1 false) | |
ret void | |
} | |
; std::process::ExitCode::to_i32 | |
; Function Attrs: inlinehint nounwind | |
define internal i32 @_ZN3std7process8ExitCode6to_i3217h6615ced61f859048E(i1 noundef zeroext %0) unnamed_addr #0 { | |
start: | |
%self = alloca i8, align 1 | |
%1 = zext i1 %0 to i8 | |
store i8 %1, i8* %self, align 1 | |
; call std::sys::wasm::process::ExitCode::as_i32 | |
%2 = call i32 @_ZN3std3sys4wasm7process8ExitCode6as_i3217h6a6f4c45997d1162E(i8* noalias noundef readonly align 1 dereferenceable(1) %self) #9 | |
br label %bb1 | |
bb1: ; preds = %start | |
ret i32 %2 | |
} | |
; <() as std::process::Termination>::report | |
; Function Attrs: inlinehint nounwind | |
define internal noundef zeroext i1 @"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h359f2be3b2c972a5E"() unnamed_addr #0 { | |
start: | |
; call <std::process::ExitCode as std::process::Termination>::report | |
%0 = call noundef zeroext i1 @"_ZN68_$LT$std..process..ExitCode$u20$as$u20$std..process..Termination$GT$6report17h1915ea60670068b2E"(i1 noundef zeroext false) #9 | |
br label %bb1 | |
bb1: ; preds = %start | |
ret i1 %0 | |
} | |
; <std::process::ExitCode as std::process::Termination>::report | |
; Function Attrs: inlinehint nounwind | |
define internal noundef zeroext i1 @"_ZN68_$LT$std..process..ExitCode$u20$as$u20$std..process..Termination$GT$6report17h1915ea60670068b2E"(i1 noundef zeroext %self) unnamed_addr #0 { | |
start: | |
ret i1 %self | |
} | |
; <core::ops::range::Range<T> as core::iter::range::RangeIteratorImpl>::spec_next | |
; Function Attrs: inlinehint nounwind | |
define internal { i32, i32 } @"_ZN89_$LT$core..ops..range..Range$LT$T$GT$$u20$as$u20$core..iter..range..RangeIteratorImpl$GT$9spec_next17h10268175b222b28cE"({ i32, i32 }* noalias noundef align 4 dereferenceable(8) %self) unnamed_addr #0 { | |
start: | |
%0 = alloca { i32, i32 }, align 4 | |
%_3 = bitcast { i32, i32 }* %self to i32* | |
%_4 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %self, i32 0, i32 1 | |
; call core::cmp::impls::<impl core::cmp::PartialOrd for usize>::lt | |
%_2 = call noundef zeroext i1 @"_ZN4core3cmp5impls57_$LT$impl$u20$core..cmp..PartialOrd$u20$for$u20$usize$GT$2lt17h74938a006694a09cE"(i32* noalias noundef readonly align 4 dereferenceable(4) %_3, i32* noalias noundef readonly align 4 dereferenceable(4) %_4) #9 | |
br label %bb1 | |
bb1: ; preds = %start | |
br i1 %_2, label %bb2, label %bb6 | |
bb6: ; preds = %bb1 | |
%1 = bitcast { i32, i32 }* %0 to i32* | |
store i32 0, i32* %1, align 4 | |
br label %bb7 | |
bb2: ; preds = %bb1 | |
%_7 = bitcast { i32, i32 }* %self to i32* | |
; call core::clone::impls::<impl core::clone::Clone for usize>::clone | |
%_6 = call i32 @"_ZN4core5clone5impls54_$LT$impl$u20$core..clone..Clone$u20$for$u20$usize$GT$5clone17h66d2ffc4a5b24e61E"(i32* noalias noundef readonly align 4 dereferenceable(4) %_7) #9 | |
br label %bb3 | |
bb3: ; preds = %bb2 | |
; call <usize as core::iter::range::Step>::forward_unchecked | |
%n = call i32 @"_ZN49_$LT$usize$u20$as$u20$core..iter..range..Step$GT$17forward_unchecked17h5ab15d61dcb714e4E"(i32 %_6, i32 1) #9 | |
br label %bb4 | |
bb4: ; preds = %bb3 | |
%_10 = bitcast { i32, i32 }* %self to i32* | |
; call core::mem::replace | |
%_8 = call i32 @_ZN4core3mem7replace17h7402ef054db8bd7cE(i32* noalias noundef align 4 dereferenceable(4) %_10, i32 %n) #9 | |
br label %bb5 | |
bb5: ; preds = %bb4 | |
%2 = bitcast { i32, i32 }* %0 to %"core::option::Option<usize>::Some"* | |
%3 = getelementptr inbounds %"core::option::Option<usize>::Some", %"core::option::Option<usize>::Some"* %2, i32 0, i32 1 | |
store i32 %_8, i32* %3, align 4 | |
%4 = bitcast { i32, i32 }* %0 to i32* | |
store i32 1, i32* %4, align 4 | |
br label %bb7 | |
bb7: ; preds = %bb6, %bb5 | |
%5 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %0, i32 0, i32 0 | |
%6 = load i32, i32* %5, align 4, !range !1 | |
%7 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %0, i32 0, i32 1 | |
%8 = load i32, i32* %7, align 4 | |
%9 = insertvalue { i32, i32 } undef, i32 %6, 0 | |
%10 = insertvalue { i32, i32 } %9, i32 %8, 1 | |
ret { i32, i32 } %10 | |
} | |
; core::iter::range::<impl core::iter::traits::iterator::Iterator for core::ops::range::Range<A>>::next | |
; Function Attrs: inlinehint nounwind | |
define internal { i32, i32 } @"_ZN4core4iter5range101_$LT$impl$u20$core..iter..traits..iterator..Iterator$u20$for$u20$core..ops..range..Range$LT$A$GT$$GT$4next17h56107ea2f77c9d3cE"({ i32, i32 }* noalias noundef align 4 dereferenceable(8) %self) unnamed_addr #0 { | |
start: | |
; call <core::ops::range::Range<T> as core::iter::range::RangeIteratorImpl>::spec_next | |
%0 = call { i32, i32 } @"_ZN89_$LT$core..ops..range..Range$LT$T$GT$$u20$as$u20$core..iter..range..RangeIteratorImpl$GT$9spec_next17h10268175b222b28cE"({ i32, i32 }* noalias noundef align 4 dereferenceable(8) %self) #9 | |
%1 = extractvalue { i32, i32 } %0, 0 | |
%2 = extractvalue { i32, i32 } %0, 1 | |
br label %bb1 | |
bb1: ; preds = %start | |
%3 = insertvalue { i32, i32 } undef, i32 %1, 0 | |
%4 = insertvalue { i32, i32 } %3, i32 %2, 1 | |
ret { i32, i32 } %4 | |
} | |
; <I as core::iter::traits::collect::IntoIterator>::into_iter | |
; Function Attrs: inlinehint nounwind | |
define internal { i32, i32 } @"_ZN63_$LT$I$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17h36968a9a29397720E"(i32 %self.0, i32 %self.1) unnamed_addr #0 { | |
start: | |
%0 = insertvalue { i32, i32 } undef, i32 %self.0, 0 | |
%1 = insertvalue { i32, i32 } %0, i32 %self.1, 1 | |
ret { i32, i32 } %1 | |
} | |
; std::rt::lang_start | |
; Function Attrs: nounwind | |
define hidden i32 @_ZN3std2rt10lang_start17habbbce002bd83d38E(void ()* nonnull %main, i32 %argc, i8** %argv) unnamed_addr #1 { | |
start: | |
%_8 = alloca i32*, align 4 | |
%_4 = alloca i32, align 4 | |
%0 = bitcast i32* %_4 to i8* | |
call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) | |
%1 = bitcast i32** %_8 to i8* | |
call void @llvm.lifetime.start.p0i8(i64 4, i8* %1) | |
%2 = bitcast i32** %_8 to void ()** | |
store void ()* %main, void ()** %2, align 4 | |
%_5.0 = bitcast i32** %_8 to {}* | |
; call std::rt::lang_start_internal | |
%3 = call i32 @_ZN3std2rt19lang_start_internal17hb8073f0a10889fcaE({}* noundef nonnull align 1 %_5.0, [3 x i32]* noalias noundef readonly align 4 dereferenceable(12) bitcast (<{ i8*, [8 x i8], i8*, i8*, i8*, [0 x i8] }>* @vtable.0 to [3 x i32]*), i32 %argc, i8** %argv) #9 | |
store i32 %3, i32* %_4, align 4 | |
br label %bb1 | |
bb1: ; preds = %start | |
%v = load i32, i32* %_4, align 4 | |
%4 = bitcast i32** %_8 to i8* | |
call void @llvm.lifetime.end.p0i8(i64 4, i8* %4) | |
%5 = bitcast i32* %_4 to i8* | |
call void @llvm.lifetime.end.p0i8(i64 4, i8* %5) | |
ret i32 %v | |
} | |
; std::rt::lang_start::{{closure}} | |
; Function Attrs: inlinehint nounwind | |
define internal i32 @"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h0e09ea9fc9244c74E"(i32** noalias noundef readonly align 4 dereferenceable(4) %_1) unnamed_addr #0 { | |
start: | |
%0 = bitcast i32** %_1 to void ()** | |
%_4 = load void ()*, void ()** %0, align 4, !nonnull !0 | |
; call std::sys_common::backtrace::__rust_begin_short_backtrace | |
call void @_ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h97e427e94bfe0c8dE(void ()* nonnull %_4) #9 | |
br label %bb1 | |
bb1: ; preds = %start | |
; call <() as std::process::Termination>::report | |
%_2 = call noundef zeroext i1 @"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h359f2be3b2c972a5E"() #9 | |
br label %bb2 | |
bb2: ; preds = %bb1 | |
; call std::process::ExitCode::to_i32 | |
%1 = call i32 @_ZN3std7process8ExitCode6to_i3217h6615ced61f859048E(i1 noundef zeroext %_2) #9 | |
br label %bb3 | |
bb3: ; preds = %bb2 | |
ret i32 %1 | |
} | |
; std::sys_common::backtrace::__rust_begin_short_backtrace | |
; Function Attrs: noinline nounwind | |
define internal void @_ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h97e427e94bfe0c8dE(void ()* nonnull %f) unnamed_addr #3 { | |
start: | |
; call core::ops::function::FnOnce::call_once | |
call void @_ZN4core3ops8function6FnOnce9call_once17h2d1e791c02f388aeE(void ()* nonnull %f) #9 | |
br label %bb1 | |
bb1: ; preds = %start | |
; call core::hint::black_box | |
call void @_ZN4core4hint9black_box17h8632ad9a839faf85E() #9 | |
br label %bb2 | |
bb2: ; preds = %bb1 | |
ret void | |
} | |
; <core::option::Option<T> as core::ops::try_trait::Try>::branch | |
; Function Attrs: inlinehint nounwind | |
define internal i32 @"_ZN75_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..ops..try_trait..Try$GT$6branch17ha7d4f7d239881f1eE"(i32 %0) unnamed_addr #0 { | |
start: | |
%1 = alloca i32, align 4 | |
%self = alloca i32, align 4 | |
store i32 %0, i32* %self, align 4 | |
%_2 = load i32, i32* %self, align 4, !range !1 | |
switch i32 %_2, label %bb2 [ | |
i32 0, label %bb1 | |
i32 1, label %bb3 | |
] | |
bb2: ; preds = %start | |
unreachable | |
bb1: ; preds = %start | |
store i32 1, i32* %1, align 4 | |
br label %bb4 | |
bb3: ; preds = %start | |
%2 = bitcast i32* %1 to %"core::ops::control_flow::ControlFlow<core::option::Option<core::convert::Infallible>, [f32; 0]>::Continue"* | |
%3 = getelementptr inbounds %"core::ops::control_flow::ControlFlow<core::option::Option<core::convert::Infallible>, [f32; 0]>::Continue", %"core::ops::control_flow::ControlFlow<core::option::Option<core::convert::Infallible>, [f32; 0]>::Continue"* %2, i32 0, i32 1 | |
store i32 0, i32* %1, align 4 | |
br label %bb4 | |
bb4: ; preds = %bb1, %bb3 | |
%4 = load i32, i32* %1, align 4, !range !1 | |
ret i32 %4 | |
} | |
; <core::option::Option<T> as core::ops::try_trait::FromResidual>::from_residual | |
; Function Attrs: inlinehint nounwind | |
define internal noundef zeroext i1 @"_ZN84_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..ops..try_trait..FromResidual$GT$13from_residual17h49383399f2f07752E"() unnamed_addr #0 { | |
start: | |
%0 = alloca i8, align 1 | |
store i8 0, i8* %0, align 1 | |
%1 = load i8, i8* %0, align 1, !range !2 | |
%2 = trunc i8 %1 to i1 | |
ret i1 %2 | |
} | |
; core::num::<impl usize>::unchecked_add | |
; Function Attrs: alwaysinline nounwind | |
define internal i32 @"_ZN4core3num23_$LT$impl$u20$usize$GT$13unchecked_add17h62d832aa08636af4E"(i32 %self, i32 %rhs) unnamed_addr #2 { | |
start: | |
%0 = alloca i32, align 4 | |
%1 = bitcast i32* %0 to i8* | |
call void @llvm.lifetime.start.p0i8(i64 4, i8* %1) | |
%2 = add nuw i32 %self, %rhs | |
store i32 %2, i32* %0, align 4 | |
%3 = load i32, i32* %0, align 4 | |
%4 = bitcast i32* %0 to i8* | |
call void @llvm.lifetime.end.p0i8(i64 4, i8* %4) | |
br label %bb1 | |
bb1: ; preds = %start | |
ret i32 %3 | |
} | |
; core::clone::impls::<impl core::clone::Clone for usize>::clone | |
; Function Attrs: inlinehint nounwind | |
define internal i32 @"_ZN4core5clone5impls54_$LT$impl$u20$core..clone..Clone$u20$for$u20$usize$GT$5clone17h66d2ffc4a5b24e61E"(i32* noalias noundef readonly align 4 dereferenceable(4) %self) unnamed_addr #0 { | |
start: | |
%0 = load i32, i32* %self, align 4 | |
ret i32 %0 | |
} | |
; core::cmp::impls::<impl core::cmp::PartialOrd for usize>::lt | |
; Function Attrs: inlinehint nounwind | |
define internal noundef zeroext i1 @"_ZN4core3cmp5impls57_$LT$impl$u20$core..cmp..PartialOrd$u20$for$u20$usize$GT$2lt17h74938a006694a09cE"(i32* noalias noundef readonly align 4 dereferenceable(4) %self, i32* noalias noundef readonly align 4 dereferenceable(4) %other) unnamed_addr #0 { | |
start: | |
%_3 = load i32, i32* %self, align 4 | |
%_4 = load i32, i32* %other, align 4 | |
%0 = icmp ult i32 %_3, %_4 | |
ret i1 %0 | |
} | |
; <usize as core::iter::range::Step>::forward_unchecked | |
; Function Attrs: inlinehint nounwind | |
define internal i32 @"_ZN49_$LT$usize$u20$as$u20$core..iter..range..Step$GT$17forward_unchecked17h5ab15d61dcb714e4E"(i32 %start1, i32 %n) unnamed_addr #0 { | |
start: | |
; call core::num::<impl usize>::unchecked_add | |
%0 = call i32 @"_ZN4core3num23_$LT$impl$u20$usize$GT$13unchecked_add17h62d832aa08636af4E"(i32 %start1, i32 %n) #9 | |
br label %bb1 | |
bb1: ; preds = %start | |
ret i32 %0 | |
} | |
; Function Attrs: argmemonly nofree nosync nounwind willreturn | |
declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #4 | |
; Function Attrs: argmemonly nofree nosync nounwind willreturn | |
declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #4 | |
; Function Attrs: nofree nosync nounwind readnone willreturn | |
declare i1 @llvm.expect.i1(i1, i1) #5 | |
; core::panicking::panic_bounds_check | |
; Function Attrs: cold noinline noreturn nounwind | |
declare dso_local void @_ZN4core9panicking18panic_bounds_check17he4f030d1ec9ef522E(i32, i32, %"core::panic::location::Location"* noalias noundef readonly align 4 dereferenceable(16)) unnamed_addr #6 | |
; core::panicking::panic | |
; Function Attrs: cold noinline noreturn nounwind | |
declare dso_local void @_ZN4core9panicking5panic17he88f1b1582b09c8cE([0 x i8]* noalias noundef nonnull readonly align 1, i32, %"core::panic::location::Location"* noalias noundef readonly align 4 dereferenceable(16)) unnamed_addr #6 | |
; Function Attrs: argmemonly nofree nounwind willreturn | |
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #7 | |
; std::sys::wasm::process::ExitCode::as_i32 | |
; Function Attrs: nounwind | |
declare dso_local i32 @_ZN3std3sys4wasm7process8ExitCode6as_i3217h6a6f4c45997d1162E(i8* noalias noundef readonly align 1 dereferenceable(1)) unnamed_addr #1 | |
; std::rt::lang_start_internal | |
; Function Attrs: nounwind | |
declare dso_local i32 @_ZN3std2rt19lang_start_internal17hb8073f0a10889fcaE({}* noundef nonnull align 1, [3 x i32]* noalias noundef readonly align 4 dereferenceable(12), i32, i8**) unnamed_addr #1 | |
define i32 @main(i32 %0, i8** %1) unnamed_addr #8 { | |
top: | |
; call std::rt::lang_start | |
%2 = call i32 @_ZN3std2rt10lang_start17habbbce002bd83d38E(void ()* @_ZN4test4main17h90cdca1c5e05c042E, i32 %0, i8** %1) | |
ret i32 %2 | |
} | |
attributes #0 = { inlinehint nounwind "target-cpu"="generic" } | |
attributes #1 = { nounwind "target-cpu"="generic" } | |
attributes #2 = { alwaysinline nounwind "target-cpu"="generic" } | |
attributes #3 = { noinline nounwind "target-cpu"="generic" } | |
attributes #4 = { argmemonly nofree nosync nounwind willreturn } | |
attributes #5 = { nofree nosync nounwind readnone willreturn } | |
attributes #6 = { cold noinline noreturn nounwind "target-cpu"="generic" } | |
attributes #7 = { argmemonly nofree nounwind willreturn } | |
attributes #8 = { "target-cpu"="generic" } | |
attributes #9 = { nounwind } | |
attributes #10 = { noreturn nounwind } | |
!0 = !{} | |
!1 = !{i32 0, i32 2} | |
!2 = !{i8 0, i8 2} | |
!3 = !{i32 2703175} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment