1 ; RUN: opt %s -passes='function(scalarizer)' -S -o - | FileCheck %s
3 ; This input caused the scalarizer to insert non-PHI nodes
4 ; in between PHI nodes (%1 and %2).
6 define <3 x float> @func(i32 %inval) {
10 0: ; preds = %3, %.entry
11 ; CHECK: %.i01 = phi float [ 0.000000e+00, %.entry ], [ %.i01, %3 ]
12 ; CHECK-NEXT: %.i12 = phi float [ 0.000000e+00, %.entry ], [ %.i12, %3 ]
13 ; CHECK-NEXT: %.i23 = phi float [ 0.000000e+00, %.entry ], [ %.i23, %3 ]
14 ; CHECK-NEXT: %1 = phi float [ 1.000000e+00, %.entry ], [ 2.000000e+00, %3 ]
15 ; CHECK-NEXT: %.upto0 = insertelement <3 x float> poison, float %.i01, i32 0
16 ; CHECK-NEXT: %.upto1 = insertelement <3 x float> %.upto0, float %.i12, i32 1
17 ; CHECK-NEXT: %2 = insertelement <3 x float> %.upto1, float %.i23, i32 2
18 %1 = phi <3 x float> [ <float 0.0, float 0.0, float 0.0>, %.entry], [ %1, %3 ]
19 %2 = phi float [ 1.0, %.entry], [ 2.0, %3 ]
23 %cond = icmp eq i32 %inval, 0
24 br i1 %cond, label %0, label %exit