blob: afa464f63f6633d0659a81a2352602a53054b5f9 [file] [log] [blame]
Simon Pilgrim55a4b672017-07-09 16:01:04 +00001; 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}