OSDN Git Service

am 0d041145: am 19c6fbb3: Merge "Adds the ability to run the llvm test suite in-tree."
[android-x86/external-llvm.git] / test / CodeGen / Mips / zeroreg.ll
1 ; RUN: llc < %s -march=mipsel | FileCheck %s
2
3 @g1 = external global i32
4
5 define i32 @foo0(i32 %s) nounwind readonly {
6 entry:
7 ; CHECK:     movn ${{[0-9]+}}, $zero
8   %tobool = icmp ne i32 %s, 0
9   %0 = load i32* @g1, align 4
10   %cond = select i1 %tobool, i32 0, i32 %0
11   ret i32 %cond
12 }
13
14 define i32 @foo1(i32 %s) nounwind readonly {
15 entry:
16 ; CHECK:     movz ${{[0-9]+}}, $zero
17   %tobool = icmp ne i32 %s, 0
18   %0 = load i32* @g1, align 4
19   %cond = select i1 %tobool, i32 %0, i32 0
20   ret i32 %cond
21 }