1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2 ; RUN: opt --passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu %s -o - -slp-threshold=-100 | FileCheck %s
3 declare i64 @llvm.smax.i64(i64, i64)
5 define i8 @foo(i64 %val_i64_57) {
6 ; CHECK-LABEL: define i8 @foo(
7 ; CHECK-SAME: i64 [[VAL_I64_57:%.*]]) {
9 ; CHECK-NEXT: [[VAL_I64_58:%.*]] = call i64 @llvm.smax.i64(i64 0, i64 1)
10 ; CHECK-NEXT: [[TMP0:%.*]] = insertelement <4 x i64> <i64 0, i64 poison, i64 poison, i64 0>, i64 [[VAL_I64_57]], i32 1
11 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <4 x i64> [[TMP0]], i64 [[VAL_I64_58]], i32 2
12 ; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <4 x i64> [[TMP1]], <4 x i64> poison, <4 x i32> <i32 2, i32 2, i32 0, i32 1>
13 ; CHECK-NEXT: [[TMP3:%.*]] = icmp ule <4 x i64> [[TMP1]], [[TMP2]]
14 ; CHECK-NEXT: [[TMP4:%.*]] = icmp sle <4 x i64> [[TMP1]], [[TMP2]]
15 ; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <4 x i1> [[TMP3]], <4 x i1> [[TMP4]], <4 x i32> <i32 0, i32 1, i32 2, i32 7>
16 ; CHECK-NEXT: ret i8 0
19 %val_i64_58 = call i64 @llvm.smax.i64(i64 0, i64 1)
20 %val_i1_89 = icmp ule i64 %val_i64_57, %val_i64_58
21 %val_i1_95 = icmp sle i64 0, undef
22 %val_i1_98 = icmp uge i64 %val_i64_58, %val_i64_58
23 %val_i1_99 = icmp ule i64 0, %val_i64_58