150 lines · plain
1; RUN: llc -mtriple=mipsel -mcpu=mips32 -relocation-model=static -O3 < %s -mips-os16 | FileCheck %s -check-prefix=322 3@x = global float 1.000000e+00, align 44@y = global float 2.000000e+00, align 45@zz = common global float 0.000000e+00, align 46@z = common global float 0.000000e+00, align 47 8define float @fv() #0 {9entry:10 ret float 1.000000e+0011}12 13; 32: .set nomips1614; 32: .ent fv15; 32: .set noreorder16; 32: .set nomacro17; 32: .set noat18; 32: jr $ra19; 32: .set at20; 32: .set macro21; 32: .set reorder22; 32: .end fv23 24define double @dv() #0 {25entry:26 ret double 2.000000e+0027}28 29; 32: .set nomips1630; 32: .ent dv31; 32: .set noreorder32; 32: .set nomacro33; 32: .set noat34; 32: jr $ra35; 32: .set at36; 32: .set macro37; 32: .set reorder38; 32: .end dv39 40define void @vf(float %x) #0 {41entry:42 %x.addr = alloca float, align 443 store float %x, ptr %x.addr, align 444 ret void45}46 47; 32: .set nomips1648; 32: .ent vf49; 32: .set noreorder50; 32: .set nomacro51; 32: .set noat52; 32: jr $ra53; 32: .set at54; 32: .set macro55; 32: .set reorder56; 32: .end vf57 58define void @vd(double %x) #0 {59entry:60 %x.addr = alloca double, align 861 store double %x, ptr %x.addr, align 862 ret void63}64 65; 32: .set nomips1666; 32: .ent vd67; 32: .set noreorder68; 32: .set nomacro69; 32: .set noat70; 32: jr $ra71; 32: .set at72; 32: .set macro73; 32: .set reorder74; 32: .end vd75 76define void @foo1() #0 {77entry:78 store float 1.000000e+00, ptr @zz, align 479 %0 = load float, ptr @y, align 480 %1 = load float, ptr @x, align 481 %add = fadd float %0, %182 store float %add, ptr @z, align 483 ret void84}85 86; 32: .set nomips1687; 32: .ent foo188; 32: .set noreorder89; 32: .set nomacro90; 32: .set noat91; 32: jr $ra92; 32: .set at93; 32: .set macro94; 32: .set reorder95; 32: .end foo196 97define void @foo2() #0 {98entry:99 %0 = load float, ptr @x, align 4100 call void @vf(float %0)101 ret void102}103 104 105; 32: .set nomips16106; 32: .ent foo2107; 32: .set noreorder108; 32: .set nomacro109; 32: .set noat110; 32: jr $ra111; 32: .set at112; 32: .set macro113; 32: .set reorder114; 32: .end foo2115 116define void @foo3() #0 {117entry:118 %call = call float @fv()119 store float %call, ptr @x, align 4120 ret void121}122 123; 32: .set nomips16124; 32: .ent foo3125; 32: .set noreorder126; 32: .set nomacro127; 32: .set noat128; 32: jr $ra129; 32: .set at130; 32: .set macro131; 32: .set reorder132; 32: .end foo3133 134attributes #0 = { nounwind "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "use-soft-float"="false" }135 136define void @vv() #0 {137entry:138 ret void139}140 141; 32: .set mips16142; 32: .ent vv143 144; 32: save {{.+}}145; 32: restore {{.+}} 146; 32: .end vv147 148 149 150