1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=slp-vectorizer -S < %s -mtriple=x86_64 -slp-threshold=-150 | FileCheck %s
4 define i1 @test(ptr %arg, ptr %i233, i64 %i241, ptr %i235, ptr %i237, ptr %i227) {
7 ; CHECK-NEXT: [[I226:%.*]] = getelementptr ptr, ptr [[ARG:%.*]], i32 7
8 ; CHECK-NEXT: [[I242:%.*]] = getelementptr double, ptr [[I233:%.*]], i64 [[I241:%.*]]
9 ; CHECK-NEXT: [[I245:%.*]] = getelementptr double, ptr [[I235:%.*]], i64 [[I241]]
10 ; CHECK-NEXT: [[I248:%.*]] = getelementptr double, ptr [[I237:%.*]], i64 [[I241]]
11 ; CHECK-NEXT: [[I250:%.*]] = getelementptr double, ptr [[I227:%.*]], i64 [[I241]]
12 ; CHECK-NEXT: [[TMP0:%.*]] = load <4 x ptr>, ptr [[I226]], align 8
13 ; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x ptr> [[TMP0]], <4 x ptr> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
14 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <8 x ptr> <ptr poison, ptr null, ptr poison, ptr null, ptr null, ptr null, ptr null, ptr null>, ptr [[I242]], i32 0
15 ; CHECK-NEXT: [[TMP3:%.*]] = insertelement <8 x ptr> [[TMP2]], ptr [[I250]], i32 2
16 ; CHECK-NEXT: [[TMP4:%.*]] = icmp ult <8 x ptr> [[TMP3]], [[TMP1]]
17 ; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <8 x ptr> [[TMP3]], <8 x ptr> poison, <4 x i32> <i32 2, i32 0, i32 poison, i32 poison>
18 ; CHECK-NEXT: [[TMP6:%.*]] = insertelement <4 x ptr> [[TMP5]], ptr [[I245]], i32 2
19 ; CHECK-NEXT: [[TMP7:%.*]] = insertelement <4 x ptr> [[TMP6]], ptr [[I248]], i32 3
20 ; CHECK-NEXT: [[TMP8:%.*]] = shufflevector <4 x ptr> [[TMP7]], <4 x ptr> poison, <8 x i32> <i32 2, i32 0, i32 1, i32 3, i32 0, i32 1, i32 2, i32 3>
21 ; CHECK-NEXT: [[TMP9:%.*]] = shufflevector <8 x ptr> [[TMP1]], <8 x ptr> <ptr poison, ptr poison, ptr null, ptr null, ptr null, ptr null, ptr null, ptr null>, <8 x i32> <i32 0, i32 1, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
22 ; CHECK-NEXT: [[TMP10:%.*]] = icmp ult <8 x ptr> [[TMP8]], [[TMP9]]
23 ; CHECK-NEXT: [[TMP11:%.*]] = shufflevector <8 x i1> [[TMP10]], <8 x i1> poison, <8 x i32> <i32 1, i32 2, i32 0, i32 3, i32 4, i32 5, i32 6, i32 7>
24 ; CHECK-NEXT: [[TMP12:%.*]] = or <8 x i1> [[TMP4]], [[TMP11]]
25 ; CHECK-NEXT: [[TMP13:%.*]] = call i1 @llvm.vector.reduce.and.v8i1(<8 x i1> [[TMP12]])
26 ; CHECK-NEXT: [[OP_RDX:%.*]] = and i1 [[TMP13]], false
27 ; CHECK-NEXT: ret i1 [[OP_RDX]]
30 %i226 = getelementptr ptr, ptr %arg, i32 7
31 %i2271 = load ptr, ptr %i226, align 8
32 %i232 = getelementptr ptr, ptr %arg, i32 8
33 %i2332 = load ptr, ptr %i232, align 8
34 %i234 = getelementptr ptr, ptr %arg, i32 9
35 %i2353 = load ptr, ptr %i234, align 8
36 %i236 = getelementptr ptr, ptr %arg, i32 10
37 %i2374 = load ptr, ptr %i236, align 8
38 %i240 = icmp ult ptr null, %i2332
39 %i242 = getelementptr double, ptr %i233, i64 %i241
40 %i243 = icmp ult ptr %i242, null
41 %i245 = getelementptr double, ptr %i235, i64 %i241
42 %i247 = icmp ult ptr null, %i2374
43 %i248 = getelementptr double, ptr %i237, i64 %i241
44 %i249 = icmp ult ptr %i248, null
45 %i250 = getelementptr double, ptr %i227, i64 %i241
46 %i251 = icmp ult ptr %i250, %i2332
47 %i252 = icmp ult ptr %i242, %i2271
48 %i253 = icmp ult ptr %i250, %i2353
49 %i254 = icmp ult ptr %i245, %i2271
50 %i255 = icmp ult ptr %i250, null
51 %i256 = icmp ult ptr null, %i2271
52 %i257 = icmp ult ptr null, %i2353
53 %i258 = icmp ult ptr %i245, null
54 %i259 = icmp ult ptr %i242, null
55 %i260 = icmp ult ptr null, %i2332
56 %i261 = icmp ult ptr null, %i2374
57 %i262 = icmp ult ptr %i248, null
58 %i263 = or i1 %i240, %i243
59 %i265 = and i1 %i263, false
60 %i266 = or i1 %i247, %i249
61 %i267 = and i1 %i265, %i266
62 %i268 = or i1 %i251, %i252
63 %i269 = and i1 %i267, %i268
64 %i270 = or i1 %i253, %i254
65 %i271 = and i1 %i269, %i270
66 %i272 = or i1 %i255, %i256
67 %i273 = and i1 %i271, %i272
68 %i274 = or i1 %i257, %i258
69 %i275 = and i1 %i273, %i274
70 %i276 = or i1 %i259, %i260
71 %i277 = and i1 %i275, %i276
72 %i278 = or i1 %i261, %i262
73 %i279 = and i1 %i277, %i278