1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mipsel -relocation-model=pic -O0 -fast-isel-abort=1 -mcpu=mips32r2 \ 2*9880d681SAndroid Build Coastguard Worker; RUN: < %s | FileCheck %s 3*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mipsel -relocation-model=pic -O0 -fast-isel-abort=1 -mcpu=mips32 \ 4*9880d681SAndroid Build Coastguard Worker; RUN: < %s | FileCheck %s 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker@f = global float 0x40D6E83280000000, align 4 8*9880d681SAndroid Build Coastguard Worker@d = global double 0x4132D68780000000, align 8 9*9880d681SAndroid Build Coastguard Worker@i_f = common global i32 0, align 4 10*9880d681SAndroid Build Coastguard Worker@i_d = common global i32 0, align 4 11*9880d681SAndroid Build Coastguard Worker@.str = private unnamed_addr constant [5 x i8] c"%i \0A\00", align 1 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind 14*9880d681SAndroid Build Coastguard Workerdefine void @ifv() { 15*9880d681SAndroid Build Coastguard Workerentry: 16*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: .ent ifv 17*9880d681SAndroid Build Coastguard Worker %0 = load float, float* @f, align 4 18*9880d681SAndroid Build Coastguard Worker %conv = fptosi float %0 to i32 19*9880d681SAndroid Build Coastguard Worker; CHECK: trunc.w.s $f[[REG:[0-9]+]], $f{{[0-9]+}} 20*9880d681SAndroid Build Coastguard Worker; CHECK: mfc1 ${{[0-9]+}}, $f[[REG]] 21*9880d681SAndroid Build Coastguard Worker store i32 %conv, i32* @i_f, align 4 22*9880d681SAndroid Build Coastguard Worker ret void 23*9880d681SAndroid Build Coastguard Worker} 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind 26*9880d681SAndroid Build Coastguard Workerdefine void @idv() { 27*9880d681SAndroid Build Coastguard Workerentry: 28*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: .ent idv 29*9880d681SAndroid Build Coastguard Worker %0 = load double, double* @d, align 8 30*9880d681SAndroid Build Coastguard Worker %conv = fptosi double %0 to i32 31*9880d681SAndroid Build Coastguard Worker; CHECK: trunc.w.d $f[[REG:[0-9]+]], $f{{[0-9]+}} 32*9880d681SAndroid Build Coastguard Worker; CHECK: mfc1 ${{[0-9]+}}, $f[[REG]] 33*9880d681SAndroid Build Coastguard Worker store i32 %conv, i32* @i_d, align 4 34*9880d681SAndroid Build Coastguard Worker ret void 35*9880d681SAndroid Build Coastguard Worker} 36