1 ; RUN: llc < %s -march=mips -relocation-model=static | FileCheck %s
4 define i32 @main() nounwind readnone {
6 %a = alloca i32, align 4 ; <i32*> [#uses=2]
7 %c = alloca i32, align 4 ; <i32*> [#uses=2]
8 volatile store i32 1, i32* %a, align 4
9 volatile store i32 0, i32* %c, align 4
10 %0 = volatile load i32* %a, align 4 ; <i32> [#uses=1]
11 %1 = icmp eq i32 %0, 0 ; <i1> [#uses=1]
12 ; CHECK: addiu $3, $zero, 0
13 %iftmp.0.0 = select i1 %1, i32 3, i32 0 ; <i32> [#uses=1]
14 %2 = volatile load i32* %c, align 4 ; <i32> [#uses=1]
15 %3 = icmp eq i32 %2, 0 ; <i1> [#uses=1]
16 ; CHECK: addiu $3, $zero, 3
17 ; CHECK: addu $2, $5, $3
18 %iftmp.2.0 = select i1 %3, i32 0, i32 5 ; <i32> [#uses=1]
19 %4 = add nsw i32 %iftmp.2.0, %iftmp.0.0 ; <i32> [#uses=1]