<div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">Hello,<br clear="all"></div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">What intrinsics "@llvm.lifetime.start/@llvm.lifetime.end" really do? As per my knowledge, they define the live ranges of variables. In the following code section, they seem redundant. However, when I remove them, the behavior of the code becomes non-deterministic. The live ranges of the variables defined by them are never used in the code.</div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">Thanks,</div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">---------------   </div><div>%37 = bitcast i32* %7 to i8*<br>  call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %37) #5<br>  store i32 0, i32* %7, align 4, !tbaa !4<br>  %38 = bitcast i32* %8 to i8*<br>  call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %38) #5<br>  store i32 99, i32* %8, align 4, !tbaa !4<br>  %39 = bitcast i32* %9 to i8*<br>  call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %39) #5<br>  store i32 1, i32* %9, align 4, !tbaa !4<br>  %40 = bitcast i32* %10 to i8*<br>  call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %40) #5<br>  store i32 0, i32* %10, align 4, !tbaa !4<br>  call void @__kmpc_for_static_init_4(%struct.ident_t* nonnull @0, i32 %23, i32 34, i32* nonnull %10, i32* nonnull %7, i32* nonnull %8, i32* nonnull %9, i32 1, i32 1) #5<br>  %41 = load i32, i32* %8, align 4, !tbaa !4<br>  %42 = icmp slt i32 %41, 99<br>  %43 = select i1 %42, i32 %41, i32 99<br>  store i32 %43, i32* %8, align 4, !tbaa !4<br>  %44 = load i32, i32* %7, align 4, !tbaa !4<br>  br label %45<br><br>45:                                               ; preds = %49, %36<br>  %46 = phi i32 [ %44, %36 ], [ %52, %49 ]<br>  %47 = load i32, i32* %8, align 4, !tbaa !4<br>  %48 = icmp sgt i32 %46, %47<br>  br i1 %48, label %53, label %49<br><br>49:                                               ; preds = %45<br>  %50 = shl nsw i32 %46, 1<br>  %51 = call i32 (i8*, ...) @printf(i8* nonnull dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %50)<br>  %52 = add nsw i32 %46, 1<br>  br label %45<br><br>53:                                               ; preds = %45<br>  call void @__kmpc_for_static_fini(%struct.ident_t* nonnull @0, i32 %23) #5<br>  call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %40) #5<br>  call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %39) #5<br>  call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %38) #5<br>  call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %37) #5<br>  call void @__kmpc_barrier(%struct.ident_t* nonnull @1, i32 %23) #5<br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Abid M. Malik<br>******************************************************<br>"I have learned silence from the talkative, toleration from the intolerant, and kindness from the unkind"---Gibran<br>"Success is not for the chosen few, but for the few who choose" --- John Maxwell<br>"Being a good person does not depend on your religion or status in life, your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD YOU TREAT OTHERS"--- Abid<br>"The Universe is talking to us, and the language of the Universe is mathematics."----Abid<br> </div></div></div></div>