brintos

brintos / llvm-project-archived public Read only

0
0
Text · 466 B · e10f8ce Raw
26 lines · plain
1; RUN: opt -S < %s -passes=correlated-propagation | FileCheck %s2 3; CHECK-LABEL: @test(4define i16 @test(i32 %a, i1 %b) {5entry:6  %c = icmp eq i32 %a, 07  br i1 %c, label %left, label %right8 9right:10  %d = trunc i32 %a to i111  br label %merge12 13left:14  br i1 %b, label %merge, label %other15 16other:17  ret i16 2318 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 %h24  ret i16 %h25}26