• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -S < %s -correlated-propagation | FileCheck %s
2
3; CHECK-LABEL: @test(
4define i16 @test(i32 %a, i1 %b) {
5entry:
6  %c = icmp eq i32 %a, 0
7  br i1 %c, label %left, label %right
8
9right:
10  %d = trunc i32 %a to i1
11  br label %merge
12
13left:
14  br i1 %b, label %merge, label %other
15
16other:
17  ret i16 23
18
19merge:
20  %f = phi i1 [%b, %left], [%d, %right]
21; CHECK: select i1 %f, i16 1, i16 0
22  %h = select i1 %f, i16 1, i16 0
23; CHECK: ret i16 %h
24  ret i16 %h
25}
26