Home | History | Annotate | Download | only in X86
      1 ; RUN: llc -mtriple=i386-pc-linux-gnu < %s -o - | grep %gs:
      2 ; RUN: llc -mtriple=x86_64-pc-linux-gnu < %s -o - | grep %fs:
      3 ; RUN: llc -code-model=kernel -mtriple=x86_64-pc-linux-gnu < %s -o - | grep %gs:
      4 ; RUN: llc -mtriple=x86_64-apple-darwin < %s -o - | grep {__stack_chk_guard}
      5 ; RUN: llc -mtriple=x86_64-apple-darwin < %s -o - | grep {__stack_chk_fail}
      6 
      7 @"\01LC" = internal constant [11 x i8] c"buf == %s\0A\00"		; <[11 x i8]*> [#uses=1]
      8 
      9 define void @test(i8* %a) nounwind ssp {
     10 entry:
     11 	%a_addr = alloca i8*		; <i8**> [#uses=2]
     12 	%buf = alloca [8 x i8]		; <[8 x i8]*> [#uses=2]
     13 	%"alloca point" = bitcast i32 0 to i32		; <i32> [#uses=0]
     14 	store i8* %a, i8** %a_addr
     15 	%buf1 = bitcast [8 x i8]* %buf to i8*		; <i8*> [#uses=1]
     16 	%0 = load i8** %a_addr, align 4		; <i8*> [#uses=1]
     17 	%1 = call i8* @strcpy(i8* %buf1, i8* %0) nounwind		; <i8*> [#uses=0]
     18 	%buf2 = bitcast [8 x i8]* %buf to i8*		; <i8*> [#uses=1]
     19 	%2 = call i32 (i8*, ...)* @printf(i8* getelementptr ([11 x i8]* @"\01LC", i32 0, i32 0), i8* %buf2) nounwind		; <i32> [#uses=0]
     20 	br label %return
     21 
     22 return:		; preds = %entry
     23 	ret void
     24 }
     25 
     26 declare i8* @strcpy(i8*, i8*) nounwind
     27 
     28 declare i32 @printf(i8*, ...) nounwind
     29