blob: 62af3dffb7b3e75727feeb8c21efc8774211d21d [file] [log] [blame]
Daniel Sanders8008de52015-10-15 14:34:23 +00001; RUN: llc -march=mipsel -mattr=mips16 -relocation-model=pic < %s | FileCheck %s -check-prefix=16
Reed Kotler4416cda2013-02-22 05:10:51 +00002
3@i = global i32 1, align 4
4@j = global i32 2, align 4
5@a = global i32 5, align 4
6@.str = private unnamed_addr constant [8 x i8] c"%i = 1\0A\00", align 1
7@k = common global i32 0, align 4
8
9define void @t() nounwind "target-cpu"="mips16" "target-features"="+mips16,+o32" {
10entry:
David Blaikiea79ac142015-02-27 21:17:42 +000011 %0 = load i32, i32* @a, align 4
Reed Kotler4416cda2013-02-22 05:10:51 +000012 %cmp = icmp ne i32 %0, 10
David Blaikiea79ac142015-02-27 21:17:42 +000013 %1 = load i32, i32* @i, align 4
14 %2 = load i32, i32* @j, align 4
Reed Kotler4416cda2013-02-22 05:10:51 +000015 %cond = select i1 %cmp, i32 %1, i32 %2
16 store i32 %cond, i32* @i, align 4
17 ret void
18}
19
20; 16: cmpi ${{[0-9]+}}, 10
21; 16: btnez $BB{{[0-9]+}}_{{[0-9]}}
22
23
24attributes #0 = { nounwind "target-cpu"="mips16" "target-features"="+mips16,+o32" }
25
26