blob: 4a366aa8fb834c88e7e1d0e78a8f5e6edf39974a [file] [log] [blame]
Duncan P. N. Exon Smith49e6a702015-03-27 22:04:28 +00001; RUN: opt < %s -disable-verify -instcombine -S | opt -S | FileCheck %s
2; Formerly crashed, PR8490.
3
4; CHECK-LABEL: @test3(
5define i32 @test3(i1 %bool, i32 %a) {
6entry:
7 %cond = or i1 %bool, true
8 br i1 %cond, label %return, label %xpto
9
10; technically reachable, but this malformed IR may appear as a result of constant propagation
11xpto:
12 %select = select i1 %bool, i32 %a, i32 %select
13 %select2 = select i1 %bool, i32 %select2, i32 %a
14 %sum = add i32 %select, %select2
15 ret i32 %sum
16
17return:
18 ret i32 7
19}