1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S -slp-threshold=-1000 | FileCheck %s
7 ; CHECK-NEXT: [[CALL37:%.*]] = load i16, ptr poison, align 2
8 ; CHECK-NEXT: br label [[BB:%.*]]
10 ; CHECK-NEXT: [[CALL:%.*]] = load i16, ptr poison, align 2
11 ; CHECK-NEXT: [[TMP0:%.*]] = insertelement <8 x i16> <i16 0, i16 0, i16 0, i16 poison, i16 poison, i16 poison, i16 0, i16 poison>, i16 [[CALL37]], i32 3
12 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <8 x i16> [[TMP0]], i16 [[CALL]], i32 5
13 ; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <8 x i16> [[TMP1]], <8 x i16> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 3, i32 5, i32 6, i32 3>
14 ; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <8 x i16> [[TMP1]], <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 poison, i16 poison>, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 3, i32 5>
15 ; CHECK-NEXT: [[TMP4:%.*]] = icmp slt <8 x i16> [[TMP2]], [[TMP3]]
16 ; CHECK-NEXT: ret void
19 %call37 = load i16, ptr poison, align 2
23 %call = load i16, ptr poison, align 2
24 %0 = icmp slt i16 %call, 0
25 %1 = icmp slt i16 %call37, %call
26 %.not = icmp sgt i16 0, %call37
27 %2 = icmp sgt i16 %call37, 0
28 %3 = icmp slt i16 0, 0
29 %.not206 = icmp sgt i16 0, %call37
30 %4 = icmp sgt i16 0, 0
31 %5 = icmp slt i16 0, 0
35 define void @test1() {
36 ; CHECK-LABEL: @test1(
38 ; CHECK-NEXT: [[CALL:%.*]] = load i16, ptr poison, align 2
39 ; CHECK-NEXT: br label [[BB:%.*]]
41 ; CHECK-NEXT: [[CALL37:%.*]] = load i16, ptr poison, align 2
42 ; CHECK-NEXT: [[TMP0:%.*]] = insertelement <8 x i16> <i16 0, i16 0, i16 0, i16 poison, i16 poison, i16 poison, i16 poison, i16 0>, i16 [[CALL]], i32 3
43 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <8 x i16> [[TMP0]], i16 [[CALL37]], i32 4
44 ; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <8 x i16> [[TMP1]], <8 x i16> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 4, i32 4, i32 7>
45 ; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <8 x i16> [[TMP1]], <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 poison, i16 poison>, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 3, i32 4>
46 ; CHECK-NEXT: [[TMP4:%.*]] = icmp slt <8 x i16> [[TMP2]], [[TMP3]]
47 ; CHECK-NEXT: ret void
50 %call = load i16, ptr poison, align 2
54 %call37 = load i16, ptr poison, align 2
55 %0 = icmp slt i16 %call, 0
56 %1 = icmp slt i16 %call37, %call
57 %.not = icmp sgt i16 0, %call37
58 %2 = icmp sgt i16 %call37, 0
59 %3 = icmp slt i16 0, 0
60 %.not206 = icmp sgt i16 0, %call37
61 %4 = icmp sgt i16 0, 0
62 %5 = icmp slt i16 0, 0