1 ; RUN: opt < %s -disable-verify -instcombine -S | opt -S | FileCheck %s 2 ; Formerly crashed, PR8490. 3 4 ; CHECK-LABEL: @test3( 5 define i32 @test3(i1 %bool, i32 %a) { 6 entry: 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 11 xpto: 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 17 return: 18 ret i32 7 19 } 20