1 ; RUN: llc -march=mipsel < %s | FileCheck %s
3 @g0 = common global i32 0, align 4
4 @g1 = common global i32 0, align 4
6 ; CHECK: addiu ${{[0-9]+}}, ${{[0-9]+}}, 23
7 ; CHECK: addiu ${{[0-9]+}}, ${{[0-9]+}}, 23
9 define i32 @test1(i32 %a) {
11 %tobool = icmp eq i32 %a, 0
12 %0 = load i32, ptr @g0, align 4
13 br i1 %tobool, label %if.else, label %if.then
16 %add = add nsw i32 %0, 1
17 store i32 %add, ptr @g0, align 4
18 %1 = load i32, ptr @g1, align 4
19 %add1 = add nsw i32 %1, 23
23 %add2 = add nsw i32 %0, 11
24 store i32 %add2, ptr @g0, align 4
25 %2 = load i32, ptr @g1, align 4
26 %add3 = add nsw i32 %2, 23
30 %storemerge = phi i32 [ %add3, %if.else ], [ %add1, %if.then ]
31 store i32 %storemerge, ptr @g1, align 4