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 -mcpu=bdver2 < %s | FileCheck %s
4 %"struct.std::array" = type { [32 x i8] }
6 ; Function Attrs: nounwind uwtable
7 define fastcc void @_ZN12_GLOBAL__N_127PolynomialMultiplyRecognize9recognizeEv() unnamed_addr #0 align 2 {
8 ; CHECK-LABEL: @_ZN12_GLOBAL__N_127PolynomialMultiplyRecognize9recognizeEv(
10 ; CHECK-NEXT: br i1 undef, label [[IF_END50_I:%.*]], label [[IF_THEN22_I:%.*]]
12 ; CHECK-NEXT: [[SUB_I:%.*]] = add nsw i32 undef, -1
13 ; CHECK-NEXT: [[CONV31_I:%.*]] = and i32 undef, [[SUB_I]]
14 ; CHECK-NEXT: [[SHR_I_I:%.*]] = lshr i32 [[CONV31_I]], 1
15 ; CHECK-NEXT: [[SHR_1_I_I:%.*]] = lshr i32 [[CONV31_I]], 2
16 ; CHECK-NEXT: [[SHR_2_I_I:%.*]] = lshr i32 [[CONV31_I]], 3
17 ; CHECK-NEXT: [[TMP0:%.*]] = trunc i32 [[SUB_I]] to i8
18 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <16 x i8> poison, i8 [[TMP0]], i32 0
19 ; CHECK-NEXT: [[TMP2:%.*]] = trunc i32 [[SHR_I_I]] to i8
20 ; CHECK-NEXT: [[TMP3:%.*]] = insertelement <16 x i8> [[TMP1]], i8 [[TMP2]], i32 1
21 ; CHECK-NEXT: [[TMP4:%.*]] = trunc i32 [[SHR_1_I_I]] to i8
22 ; CHECK-NEXT: [[TMP5:%.*]] = insertelement <16 x i8> [[TMP3]], i8 [[TMP4]], i32 2
23 ; CHECK-NEXT: [[TMP6:%.*]] = trunc i32 [[SHR_2_I_I]] to i8
24 ; CHECK-NEXT: [[TMP7:%.*]] = insertelement <16 x i8> [[TMP5]], i8 [[TMP6]], i32 3
25 ; CHECK-NEXT: [[TMP8:%.*]] = insertelement <4 x i32> poison, i32 [[CONV31_I]], i32 0
26 ; CHECK-NEXT: [[TMP9:%.*]] = shufflevector <4 x i32> [[TMP8]], <4 x i32> poison, <4 x i32> zeroinitializer
27 ; CHECK-NEXT: [[TMP10:%.*]] = lshr <4 x i32> [[TMP9]], <i32 4, i32 5, i32 6, i32 7>
28 ; CHECK-NEXT: [[TMP11:%.*]] = trunc <4 x i32> [[TMP10]] to <4 x i8>
29 ; CHECK-NEXT: [[TMP12:%.*]] = shufflevector <4 x i8> [[TMP11]], <4 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
30 ; CHECK-NEXT: [[TMP13:%.*]] = shufflevector <16 x i8> [[TMP7]], <16 x i8> [[TMP12]], <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 16, i32 17, i32 18, i32 19, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
31 ; CHECK-NEXT: [[TMP14:%.*]] = insertelement <8 x i32> poison, i32 [[CONV31_I]], i32 0
32 ; CHECK-NEXT: [[TMP15:%.*]] = shufflevector <8 x i32> [[TMP14]], <8 x i32> poison, <8 x i32> zeroinitializer
33 ; CHECK-NEXT: [[TMP16:%.*]] = lshr <8 x i32> [[TMP15]], <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
34 ; CHECK-NEXT: [[TMP17:%.*]] = trunc <8 x i32> [[TMP16]] to <8 x i8>
35 ; CHECK-NEXT: [[TMP18:%.*]] = shufflevector <8 x i8> [[TMP17]], <8 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
36 ; CHECK-NEXT: [[TMP19:%.*]] = shufflevector <16 x i8> [[TMP13]], <16 x i8> [[TMP18]], <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23>
37 ; CHECK-NEXT: [[TMP20:%.*]] = and <16 x i8> [[TMP19]], <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
38 ; CHECK-NEXT: store <16 x i8> [[TMP20]], ptr undef, align 1
39 ; CHECK-NEXT: unreachable
41 ; CHECK-NEXT: ret void
44 br i1 undef, label %if.end50.i, label %if.then22.i
46 if.then22.i: ; preds = %entry
47 %sub.i = add nsw i32 undef, -1
48 %conv31.i = and i32 undef, %sub.i
49 %0 = trunc i32 %sub.i to i8
50 %conv.i.i1199 = and i8 %0, 1
51 store i8 %conv.i.i1199, ptr undef, align 1
52 %shr.i.i = lshr i32 %conv31.i, 1
53 %1 = trunc i32 %shr.i.i to i8
54 %conv.1.i.i = and i8 %1, 1
55 %arrayidx.i.i7.1.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 1
56 store i8 %conv.1.i.i, ptr %arrayidx.i.i7.1.i.i, align 1
57 %shr.1.i.i = lshr i32 %conv31.i, 2
58 %2 = trunc i32 %shr.1.i.i to i8
59 %conv.2.i.i = and i8 %2, 1
60 %arrayidx.i.i7.2.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 2
61 store i8 %conv.2.i.i, ptr %arrayidx.i.i7.2.i.i, align 1
62 %shr.2.i.i = lshr i32 %conv31.i, 3
63 %3 = trunc i32 %shr.2.i.i to i8
64 %conv.3.i.i = and i8 %3, 1
65 %arrayidx.i.i7.3.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 3
66 store i8 %conv.3.i.i, ptr %arrayidx.i.i7.3.i.i, align 1
67 %shr.3.i.i = lshr i32 %conv31.i, 4
68 %4 = trunc i32 %shr.3.i.i to i8
69 %conv.4.i.i = and i8 %4, 1
70 %arrayidx.i.i7.4.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 4
71 store i8 %conv.4.i.i, ptr %arrayidx.i.i7.4.i.i, align 1
72 %shr.4.i.i = lshr i32 %conv31.i, 5
73 %5 = trunc i32 %shr.4.i.i to i8
74 %conv.5.i.i = and i8 %5, 1
75 %arrayidx.i.i7.5.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 5
76 store i8 %conv.5.i.i, ptr %arrayidx.i.i7.5.i.i, align 1
77 %shr.5.i.i = lshr i32 %conv31.i, 6
78 %6 = trunc i32 %shr.5.i.i to i8
79 %conv.6.i.i = and i8 %6, 1
80 %arrayidx.i.i7.6.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 6
81 store i8 %conv.6.i.i, ptr %arrayidx.i.i7.6.i.i, align 1
82 %shr.6.i.i = lshr i32 %conv31.i, 7
83 %7 = trunc i32 %shr.6.i.i to i8
84 %conv.7.i.i = and i8 %7, 1
85 %arrayidx.i.i7.7.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 7
86 store i8 %conv.7.i.i, ptr %arrayidx.i.i7.7.i.i, align 1
87 %shr.7.i.i = lshr i32 %conv31.i, 8
88 %8 = trunc i32 %shr.7.i.i to i8
89 %conv.8.i.i = and i8 %8, 1
90 %arrayidx.i.i7.8.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 8
91 store i8 %conv.8.i.i, ptr %arrayidx.i.i7.8.i.i, align 1
92 %shr.8.i.i = lshr i32 %conv31.i, 9
93 %9 = trunc i32 %shr.8.i.i to i8
94 %conv.9.i.i = and i8 %9, 1
95 %arrayidx.i.i7.9.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 9
96 store i8 %conv.9.i.i, ptr %arrayidx.i.i7.9.i.i, align 1
97 %shr.9.i.i = lshr i32 %conv31.i, 10
98 %10 = trunc i32 %shr.9.i.i to i8
99 %conv.10.i.i = and i8 %10, 1
100 %arrayidx.i.i7.10.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 10
101 store i8 %conv.10.i.i, ptr %arrayidx.i.i7.10.i.i, align 1
102 %shr.10.i.i = lshr i32 %conv31.i, 11
103 %11 = trunc i32 %shr.10.i.i to i8
104 %conv.11.i.i = and i8 %11, 1
105 %arrayidx.i.i7.11.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 11
106 store i8 %conv.11.i.i, ptr %arrayidx.i.i7.11.i.i, align 1
107 %shr.11.i.i = lshr i32 %conv31.i, 12
108 %12 = trunc i32 %shr.11.i.i to i8
109 %conv.12.i.i = and i8 %12, 1
110 %arrayidx.i.i7.12.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 12
111 store i8 %conv.12.i.i, ptr %arrayidx.i.i7.12.i.i, align 1
112 %shr.12.i.i = lshr i32 %conv31.i, 13
113 %13 = trunc i32 %shr.12.i.i to i8
114 %conv.13.i.i = and i8 %13, 1
115 %arrayidx.i.i7.13.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 13
116 store i8 %conv.13.i.i, ptr %arrayidx.i.i7.13.i.i, align 1
117 %shr.13.i.i = lshr i32 %conv31.i, 14
118 %14 = trunc i32 %shr.13.i.i to i8
119 %conv.14.i.i = and i8 %14, 1
120 %arrayidx.i.i7.14.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 14
121 store i8 %conv.14.i.i, ptr %arrayidx.i.i7.14.i.i, align 1
122 %shr.14.i.i = lshr i32 %conv31.i, 15
123 %15 = trunc i32 %shr.14.i.i to i8
124 %conv.15.i.i = and i8 %15, 1
125 %arrayidx.i.i7.15.i.i = getelementptr inbounds %"struct.std::array", ptr undef, i64 0, i32 0, i64 15
126 store i8 %conv.15.i.i, ptr %arrayidx.i.i7.15.i.i, align 1
129 if.end50.i: ; preds = %entry