1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
2 ; RUN: opt -passes=slp-vectorizer -S < %s -o - -mtriple=x86_64-unknown-linux-gnu -mattr=+avx | FileCheck %s
5 ; CHECK-LABEL: define void @test
6 ; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
8 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> zeroinitializer)
9 ; CHECK-NEXT: [[OP_RDX2:%.*]] = add i32 0, [[TMP0]]
10 ; CHECK-NEXT: store i32 [[OP_RDX2]], ptr null, align 4
11 ; CHECK-NEXT: ret void
14 %shl183 = shl i32 0, 0
15 %shl187 = shl i32 0, 0
16 %or188 = or i32 %shl183, 0
17 %add189 = add i32 %or188, %shl183
18 %add190 = add i32 0, %add189
19 %shl191 = shl i32 0, 0
20 %or192 = or i32 %shl187, 0
21 %add193 = add i32 %or192, %shl187
22 %add194 = add i32 %add190, %add193
23 %or196 = or i32 %shl191, 0
24 %add198 = add i32 %add194, %or196
25 %shl199 = shl i32 0, 0
26 %or203 = or i32 %shl199, 0
27 %add205 = add i32 %add198, %or203
28 store i32 %add205, ptr null, align 4