1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
2 ; RUN: opt -S -passes=slp-vectorizer -mattr=+avx -mtriple=x86_64 < %s | FileCheck %s
5 ; CHECK-LABEL: define void @test
6 ; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
7 ; CHECK-NEXT: br i1 undef, label [[BB1:%.*]], label [[BB2:%.*]]
9 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @llvm.vector.reduce.mul.v8i32(<8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 undef, i32 undef, i32 undef, i32 undef>)
10 ; CHECK-NEXT: call void @f(i32 noundef [[TMP1]])
11 ; CHECK-NEXT: br label [[BB2]]
13 ; CHECK-NEXT: ret void
15 %i27 = extractelement <4 x i32> poison, i64 0
16 %i28 = extractelement <4 x i32> poison, i64 1
17 %i29 = extractelement <4 x i32> poison, i64 2
18 %i30 = extractelement <4 x i32> poison, i64 3
19 %i31 = extractelement <4 x i32> zeroinitializer, i64 0
20 %i32 = extractelement <4 x i32> zeroinitializer, i64 1
21 %i33 = extractelement <4 x i32> zeroinitializer, i64 2
22 %i34 = extractelement <4 x i32> zeroinitializer, i64 3
23 br i1 undef, label %bb1, label %bb2
26 %i11 = mul nsw i32 %i28, %i27
27 %i12 = mul nsw i32 %i11, %i29
28 %i13 = mul nsw i32 %i12, %i30
29 %i14 = mul nsw i32 %i13, %i31
30 %i15 = mul nsw i32 %i14, %i32
31 %i16 = mul nsw i32 %i15, %i33
32 %i17 = mul nsw i32 %i16, %i34
33 call void @f(i32 noundef %i17)