brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 1aff91c Raw
74 lines · plain
1; RUN: llc  -mtriple=mipsel -mcpu=mips32 -relocation-model=static -O3 < %s -mips-mixed-16-32  | FileCheck %s -check-prefix=322 3@x = global float 1.000000e+00, align 44@y = global float 0x4007333340000000, align 45@i = common global i32 0, align 46@f = common global float 0.000000e+00, align 47@.str = private unnamed_addr constant [8 x i8] c"f = %f\0A\00", align 18@.str1 = private unnamed_addr constant [11 x i8] c"hello %i \0A\00", align 19@.str2 = private unnamed_addr constant [13 x i8] c"goodbye %i \0A\00", align 110 11define void @foo() #0 {12entry:13  store i32 10, ptr @i, align 414  ret void15}16 17; 32: 	.set	mips1618; 32: 	.ent	foo19; 32:	jrc $ra20; 32:	.end	foo21 22define void @nofoo() #1 {23entry:24  store i32 20, ptr @i, align 425  %0 = load float, ptr @x, align 426  %1 = load float, ptr @y, align 427  %add = fadd float %0, %128  store float %add, ptr @f, align 429  %2 = load float, ptr @f, align 430  %conv = fpext float %2 to double31  %call = call i32 (ptr, ...) @printf(ptr @.str, double %conv)32  ret void33}34 35; 32: 	.set	nomips1636; 32: 	.ent	nofoo37; 32:	.set	noreorder38; 32:	.set	nomacro39; 32:	.set	noat40; 32:	add.s	{{.+}}41; 32:	mfc1    {{.+}}42; 32:	.set	at43; 32:	.set	macro44; 32:	.set	reorder45; 32:	.end	nofoo46declare i32 @printf(ptr, ...) #247 48define i32 @main() #3 {49entry:50  call void @foo()51  %0 = load i32, ptr @i, align 452  %call = call i32 (ptr, ...) @printf(ptr @.str1, i32 %0)53  call void @nofoo()54  %1 = load i32, ptr @i, align 455  %call1 = call i32 (ptr, ...) @printf(ptr @.str2, i32 %1)56  ret i32 057}58 59; 32: 	.set	nomips1660; 32: 	.ent	main61; 32:	.set	noreorder62; 32:	.set	nomacro63; 32:	.set	noat64; 32:	jr	$ra65; 32:	.set	at66; 32:	.set	macro67; 32:	.set	reorder68; 32:	.end	main69 70attributes #0 = { nounwind "less-precise-fpmad"="false" "mips16" "frame-pointer"="non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "use-soft-float"="false" }71attributes #1 = { nounwind "less-precise-fpmad"="false" "frame-pointer"="non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "nomips16" "use-soft-float"="false" }72attributes #2 = { "less-precise-fpmad"="false" "frame-pointer"="non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "use-soft-float"="false" }73attributes #3 = { nounwind "less-precise-fpmad"="false" "frame-pointer"="non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "use-soft-float"="false" }74