1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
7 ; CHECK-NEXT: [[A:%.*]] = getelementptr [1000 x i64], ptr null, i64 0, i64 5
8 ; CHECK-NEXT: [[A1:%.*]] = getelementptr [1000 x i64], ptr null, i64 0, i64 6
9 ; CHECK-NEXT: [[A2:%.*]] = getelementptr [1000 x i64], ptr null, i64 0, i64 7
10 ; CHECK-NEXT: br label [[WHILE:%.*]]
12 ; CHECK-NEXT: [[PH:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[OP_RDX5:%.*]], [[WHILE]] ]
13 ; CHECK-NEXT: [[TMP0:%.*]] = load i64, ptr null, align 8
14 ; CHECK-NEXT: [[TMP1:%.*]] = load i64, ptr [[A1]], align 16
15 ; CHECK-NEXT: [[TMP2:%.*]] = load <2 x i64>, ptr [[A2]], align 8
16 ; CHECK-NEXT: [[TMP3:%.*]] = load i64, ptr null, align 8
17 ; CHECK-NEXT: [[TMP4:%.*]] = load <4 x i64>, ptr [[A]], align 8
18 ; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <2 x i64> [[TMP2]], <2 x i64> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
19 ; CHECK-NEXT: [[TMP6:%.*]] = insertelement <8 x i64> [[TMP5]], i64 [[TMP0]], i32 2
20 ; CHECK-NEXT: [[TMP7:%.*]] = insertelement <8 x i64> [[TMP6]], i64 [[TMP1]], i32 3
21 ; CHECK-NEXT: [[TMP8:%.*]] = shufflevector <4 x i64> [[TMP4]], <4 x i64> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>
22 ; CHECK-NEXT: [[TMP9:%.*]] = shufflevector <8 x i64> [[TMP7]], <8 x i64> [[TMP8]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 10, i32 11>
23 ; CHECK-NEXT: [[TMP10:%.*]] = shufflevector <8 x i64> [[TMP9]], <8 x i64> zeroinitializer, <8 x i32> <i32 8, i32 8, i32 2, i32 3, i32 4, i32 5, i32 8, i32 8>
24 ; CHECK-NEXT: [[TMP11:%.*]] = call i64 @llvm.vector.reduce.xor.v8i64(<8 x i64> [[TMP10]])
25 ; CHECK-NEXT: [[OP_RDX5]] = xor i64 [[TMP3]], [[TMP11]]
26 ; CHECK-NEXT: br label [[WHILE]]
29 %a = getelementptr [1000 x i64], ptr null, i64 0, i64 5
30 %a1 = getelementptr [1000 x i64], ptr null, i64 0, i64 6
31 %a2 = getelementptr [1000 x i64], ptr null, i64 0, i64 7
32 %a3 = getelementptr [1000 x i64], ptr null, i64 0, i64 8
36 %ph = phi i64 [ 0, %entry ], [ %xor, %while ]
37 %0 = load i64, ptr null, align 8
38 %1 = load i64, ptr %a1, align 16
39 %2 = load i64, ptr %a2, align 8
40 %3 = load i64, ptr %a3, align 16
41 %4 = load i64, ptr null, align 8
42 %5 = load i64, ptr %a, align 8
43 %6 = load i64, ptr %a1, align 16
44 %7 = load i64, ptr %a2, align 8
45 %8 = load i64, ptr %a3, align 16
73 %xor = xor i64 %35, %8