1; RUN: opt -instcombine -instcombine-code-sinking=0 -S < %s | FileCheck %s
2
3define i32 @test(i1 %C, i32 %A, i32 %B) {
4; CHECK-LABEL: @test(
5; CHECK: sdiv i32
6; CHECK-NEXT: add i32
7entry:
8        %tmp.2 = sdiv i32 %A, %B                ; <i32> [#uses=1]
9        %tmp.9 = add i32 %B, %A         ; <i32> [#uses=1]
10        br i1 %C, label %then, label %endif
11
12then:           ; preds = %entry
13; CHECK: ret i32
14        ret i32 %tmp.9
15
16endif:          ; preds = %entry
17; CHECK: ret i32
18        ret i32 %tmp.2
19}
20