blob: 51d55f0a7c4df9f0a6e13bdfa1c99bf4c1118151 [file] [log] [blame]
Akira Hatanaka1d6b38d2011-03-31 18:26:17 +00001; RUN: llc < %s -march=mipsel -mcpu=4ke | FileCheck %s -check-prefix=CHECK-MIPS32R2
2; RUN: llc < %s -march=mipsel | FileCheck %s -check-prefix=CHECK-MIPS1
3
4@g1 = external global i32
5
6define i32 @f(float %f0, float %f1) nounwind {
7entry:
8; CHECK-MIPS32R2: c.olt.s
9; CHECK-MIPS32R2: movt
10; CHECK-MIPS32R2: c.olt.s
11; CHECK-MIPS32R2: movt
12; CHECK-MIPS1: c.olt.s
13; CHECK-MIPS1: bc1f
14; CHECK-MIPS1: c.olt.s
15; CHECK-MIPS1: bc1f
16 %cmp = fcmp olt float %f0, %f1
17 %conv = zext i1 %cmp to i32
18 %tmp2 = load i32* @g1, align 4
19 %add = add nsw i32 %tmp2, %conv
20 store i32 %add, i32* @g1, align 4
21 %cond = select i1 %cmp, i32 10, i32 20
22 ret i32 %cond
23}