1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=slp-vectorizer -S -mtriple=x86_64-- -mcpu=skylake-avx512 | FileCheck %s
4 define void @foo(ptr noalias nocapture %t0, ptr noalias nocapture readonly %t1) {
6 ; CHECK-NEXT: [[TMP2:%.*]] = load <8 x i8>, ptr [[T1:%.*]], align 1, !tbaa [[TBAA0:![0-9]+]]
7 ; CHECK-NEXT: [[TMP3:%.*]] = icmp ult <8 x i8> [[TMP2]], <i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64>
8 ; CHECK-NEXT: [[TMP4:%.*]] = sub <8 x i8> zeroinitializer, [[TMP2]]
9 ; CHECK-NEXT: [[TMP5:%.*]] = select <8 x i1> [[TMP3]], <8 x i8> [[TMP2]], <8 x i8> [[TMP4]]
10 ; CHECK-NEXT: store <8 x i8> [[TMP5]], ptr [[T0:%.*]], align 1, !tbaa [[TBAA0]]
11 ; CHECK-NEXT: ret void
13 %t3 = load i8, ptr %t1, align 1, !tbaa !3
14 %t4 = icmp ult i8 %t3, 64
16 %t6 = select i1 %t4, i8 %t3, i8 %t5
17 store i8 %t6, ptr %t0, align 1, !tbaa !3
18 %t7 = getelementptr inbounds i8, ptr %t1, i64 1
19 %t8 = load i8, ptr %t7, align 1, !tbaa !3
20 %t9 = icmp ult i8 %t8, 64
22 %t11 = select i1 %t9, i8 %t8, i8 %t10
23 %t12 = getelementptr inbounds i8, ptr %t0, i64 1
24 store i8 %t11, ptr %t12, align 1, !tbaa !3
25 %t13 = getelementptr inbounds i8, ptr %t1, i64 2
26 %t14 = load i8, ptr %t13, align 1, !tbaa !3
27 %t15 = icmp ult i8 %t14, 64
29 %t17 = select i1 %t15, i8 %t14, i8 %t16
30 %t18 = getelementptr inbounds i8, ptr %t0, i64 2
31 store i8 %t17, ptr %t18, align 1, !tbaa !3
32 %t19 = getelementptr inbounds i8, ptr %t1, i64 3
33 %t20 = load i8, ptr %t19, align 1, !tbaa !3
34 %t21 = icmp ult i8 %t20, 64
36 %t23 = select i1 %t21, i8 %t20, i8 %t22
37 %t24 = getelementptr inbounds i8, ptr %t0, i64 3
38 store i8 %t23, ptr %t24, align 1, !tbaa !3
39 %t25 = getelementptr inbounds i8, ptr %t1, i64 4
40 %t26 = load i8, ptr %t25, align 1, !tbaa !3
41 %t27 = icmp ult i8 %t26, 64
43 %t29 = select i1 %t27, i8 %t26, i8 %t28
44 %t30 = getelementptr inbounds i8, ptr %t0, i64 4
45 store i8 %t29, ptr %t30, align 1, !tbaa !3
46 %t31 = getelementptr inbounds i8, ptr %t1, i64 5
47 %t32 = load i8, ptr %t31, align 1, !tbaa !3
48 %t33 = icmp ult i8 %t32, 64
50 %t35 = select i1 %t33, i8 %t32, i8 %t34
51 %t36 = getelementptr inbounds i8, ptr %t0, i64 5
52 store i8 %t35, ptr %t36, align 1, !tbaa !3
53 %t37 = getelementptr inbounds i8, ptr %t1, i64 6
54 %t38 = load i8, ptr %t37, align 1, !tbaa !3
55 %t39 = icmp ult i8 %t38, 64
57 %t41 = select i1 %t39, i8 %t38, i8 %t40
58 %t42 = getelementptr inbounds i8, ptr %t0, i64 6
59 store i8 %t41, ptr %t42, align 1, !tbaa !3
60 %t43 = getelementptr inbounds i8, ptr %t1, i64 7
61 %t44 = load i8, ptr %t43, align 1, !tbaa !3
62 %t45 = icmp ult i8 %t44, 64
64 %t47 = select i1 %t45, i8 %t44, i8 %t46
65 %t48 = getelementptr inbounds i8, ptr %t0, i64 7
66 store i8 %t47, ptr %t48, align 1, !tbaa !3
71 !4 = !{!"omnipotent char", !5, i64 0}
72 !5 = !{!"Simple C++ TBAA"}