1; RUN: llc < %s
2
3; PR33094
4; Make sure that a constant extractvalue doesn't cause a crash in
5; SelectionDAGBuilder::visitExtractValue.
6
7%A = type {}
8%B = type {}
9%Tuple = type { i64 }
10
11@A_Inst = global %A zeroinitializer
12@B_Inst = global %B zeroinitializer
13
14define i64 @foo() {
15  ret i64 extractvalue (%Tuple select (i1 icmp eq
16                        (%B* bitcast (%A* @A_Inst to %B*), %B* @B_Inst),
17                        %Tuple { i64 33 }, %Tuple { i64 42 }), 0)
18}
19