2 ; RUN: opt < %s -disable-output -passes=rewrite-statepoints-for-gc
4 ; We shouldn't crash when we encounter a vector phi with more than one input
5 ; from the same predecessor.
6 define void @foo(<2 x ptr addrspace(1)> %arg1, i32 %arg2, i1 %arg3, <2 x ptr addrspace(1)> %arg4) gc "statepoint-example" personality ptr null {
8 %tmp = bitcast <2 x ptr addrspace(1)> %arg1 to <2 x ptr addrspace(1)>
9 switch i32 %arg2, label %bb2 [
15 br i1 %arg3, label %bb8, label %bb4
17 bb4: ; preds = %bb2, %bb, %bb
18 %tmp5 = phi <2 x ptr addrspace(1)> [ %tmp, %bb ], [ %tmp, %bb ], [ %arg4, %bb2 ]
20 %tmp6 = extractelement <2 x ptr addrspace(1)> %tmp5, i32 1