1; XFAIL: * 2; REQUIRES: asserts 3; RUN: opt < %s -disable-output -passes=rewrite-statepoints-for-gc 4 5; We shouldn't crash when we encounter a vector phi with more than one input 6; from the same predecessor. 7define void @foo(<2 x i8 addrspace(1)*> %arg1, i32 %arg2, i1 %arg3, <2 x i64 addrspace(1)*> %arg4) gc "statepoint-example" personality i32* null { 8bb: 9 %tmp = bitcast <2 x i8 addrspace(1)*> %arg1 to <2 x i64 addrspace(1)*> 10 switch i32 %arg2, label %bb2 [ 11 i32 1, label %bb4 12 i32 2, label %bb4 13 ] 14 15bb2: ; preds = %bb 16 br i1 %arg3, label %bb8, label %bb4 17 18bb4: ; preds = %bb2, %bb, %bb 19 %tmp5 = phi <2 x i64 addrspace(1)*> [ %tmp, %bb ], [ %tmp, %bb ], [ %arg4, %bb2 ] 20 call void @bar() 21 %tmp6 = extractelement <2 x i64 addrspace(1)*> %tmp5, i32 1 22 ret void 23 24bb8: ; preds = %bb2 25 ret void 26} 27 28declare void @bar() 29