Match a pattern generated by a dag combiner opt where:
[oota-llvm.git] / test / CodeGen / Mips / cmov.ll
1 ; RUN: llc -march=mips -mcpu=4ke < %s | FileCheck %s
2
3 @i1 = global [3 x i32] [i32 1, i32 2, i32 3], align 4
4 @i3 = common global i32* null, align 4
5
6 ; CHECK:  lw  $3, %got(i3)($gp)
7 ; CHECK:  addiu $5, $gp, %got(i1)
8 define i32* @cmov1(i32 %s) nounwind readonly {
9 entry:
10   %tobool = icmp ne i32 %s, 0
11   %tmp1 = load i32** @i3, align 4
12   %cond = select i1 %tobool, i32* getelementptr inbounds ([3 x i32]* @i1, i32 0, i32 0), i32* %tmp1
13   ret i32* %cond
14 }
15