1; RUN: llc < %s -march=x86 | FileCheck %s
2; PR1016
3
4; CHECK: {{test.*1}}
5
6define i32 @test(i32 %A, i32 %B, i32 %C) {
7        %a = trunc i32 %A to i1         ; <i1> [#uses=1]
8        %D = select i1 %a, i32 %B, i32 %C               ; <i32> [#uses=1]
9        ret i32 %D
10}
11
12