1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2 ; RUN: %if x86-registered-target %{ opt -passes=slp-vectorizer -S -slp-threshold=-99999 -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s %}
3 ; RUN: %if aarch64-registered-target %{ opt -passes=slp-vectorizer -S -slp-threshold=-99999 -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}
6 ; CHECK-LABEL: define void @test() {
8 ; CHECK-NEXT: br label [[BB1:%.*]]
10 ; CHECK-NEXT: [[PHI7:%.*]] = phi i32 [ 0, [[BB10:%.*]] ], [ 0, [[BB:%.*]] ]
11 ; CHECK-NEXT: [[TMP0:%.*]] = phi <8 x i32> [ poison, [[BB10]] ], [ zeroinitializer, [[BB]] ]
12 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x i32> <i32 poison, i32 undef>, i32 [[PHI7]], i32 0
13 ; CHECK-NEXT: switch i32 0, label [[BB16:%.*]] [
14 ; CHECK-NEXT: i32 0, label [[BB14:%.*]]
15 ; CHECK-NEXT: i32 1, label [[BB11:%.*]]
18 ; CHECK-NEXT: br label [[BB11]]
20 ; CHECK-NEXT: br label [[BB1]]
22 ; CHECK-NEXT: [[TMP2:%.*]] = phi <2 x i32> [ poison, [[BB9:%.*]] ], [ [[TMP1]], [[BB1]] ]
23 ; CHECK-NEXT: ret void
25 ; CHECK-NEXT: ret void
27 ; CHECK-NEXT: ret void
29 ; CHECK-NEXT: [[TMP3:%.*]] = phi <8 x i32> [ [[TMP0]], [[BB1]] ], [ poison, [[BB25:%.*]] ]
30 ; CHECK-NEXT: ret void
32 ; CHECK-NEXT: switch i32 0, label [[BB16]] [
33 ; CHECK-NEXT: i32 0, label [[BB14]]
34 ; CHECK-NEXT: i32 1, label [[BB15:%.*]]
41 %phi = phi i32 [ 0, %bb10 ], [ 0, %bb ]
42 %phi2 = phi i32 [ 0, %bb10 ], [ 0, %bb ]
43 %phi3 = phi i32 [ 0, %bb10 ], [ 0, %bb ]
44 %phi4 = phi i32 [ 0, %bb10 ], [ 0, %bb ]
45 %phi5 = phi i32 [ 0, %bb10 ], [ 0, %bb ]
46 %phi6 = phi i32 [ 0, %bb10 ], [ 0, %bb ]
47 %phi7 = phi i32 [ 0, %bb10 ], [ 0, %bb ]
48 %phi8 = phi i32 [ 0, %bb10 ], [ 0, %bb ]
49 switch i32 0, label %bb16 [
61 %phi12 = phi i32 [ 0, %bb9 ], [ %phi7, %bb1 ]
62 %phi13 = phi i32 [ 0, %bb9 ], [ undef, %bb1 ]
72 %phi17 = phi i32 [ %phi, %bb1 ], [ 0, %bb25 ]
73 %phi18 = phi i32 [ %phi2, %bb1 ], [ 0, %bb25 ]
74 %phi19 = phi i32 [ %phi3, %bb1 ], [ 0, %bb25 ]
75 %phi20 = phi i32 [ %phi4, %bb1 ], [ 0, %bb25 ]
76 %phi21 = phi i32 [ %phi5, %bb1 ], [ 0, %bb25 ]
77 %phi22 = phi i32 [ %phi6, %bb1 ], [ 0, %bb25 ]
78 %phi23 = phi i32 [ %phi7, %bb1 ], [ 0, %bb25 ]
79 %phi24 = phi i32 [ %phi8, %bb1 ], [ 0, %bb25 ]
83 switch i32 0, label %bb16 [