Lower BlockAddress node when relocation-model is static.
[oota-llvm.git] / test / CodeGen / Mips / cmov.ll
1 ; RUN: llc -march=mips -mcpu=4ke < %s | FileCheck %s
2 ; RUN: llc -march=mips -mcpu=4ke -regalloc=basic < %s | FileCheck %s
3
4 @i1 = global [3 x i32] [i32 1, i32 2, i32 3], align 4
5 @i3 = common global i32* null, align 4
6
7 ; CHECK:  lw  ${{[0-9]+}}, %got(i3)($gp)
8 ; CHECK:  addiu ${{[0-9]+}}, $gp, %got(i1)
9 define i32* @cmov1(i32 %s) nounwind readonly {
10 entry:
11   %tobool = icmp ne i32 %s, 0
12   %tmp1 = load i32** @i3, align 4
13   %cond = select i1 %tobool, i32* getelementptr inbounds ([3 x i32]* @i1, i32 0, i32 0), i32* %tmp1
14   ret i32* %cond
15 }
16