1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2 ; RUN: opt -S --passes=slp-vectorizer -mtriple=systemz-unknown -mcpu=z15 < %s -slp-threshold=-10 | FileCheck %s
4 define i32 @test(ptr %0, ptr %1) {
5 ; CHECK-LABEL: define i32 @test(
6 ; CHECK-SAME: ptr [[TMP0:%.*]], ptr [[TMP1:%.*]]) #[[ATTR0:[0-9]+]] {
7 ; CHECK-NEXT: [[TMP3:%.*]] = load i64, ptr inttoptr (i64 32 to ptr), align 32
8 ; CHECK-NEXT: [[TMP4:%.*]] = load ptr, ptr [[TMP1]], align 8
9 ; CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[TMP4]], i64 32
10 ; CHECK-NEXT: [[TMP6:%.*]] = load i64, ptr [[TMP5]], align 8
11 ; CHECK-NEXT: [[TMP7:%.*]] = insertelement <2 x i64> poison, i64 [[TMP6]], i32 0
12 ; CHECK-NEXT: [[TMP14:%.*]] = insertelement <2 x i64> [[TMP7]], i64 [[TMP3]], i32 1
13 ; CHECK-NEXT: [[TMP9:%.*]] = icmp ne <2 x i64> [[TMP14]], zeroinitializer
14 ; CHECK-NEXT: [[TMP16:%.*]] = sext <2 x i1> [[TMP9]] to <2 x i8>
15 ; CHECK-NEXT: [[TMP11:%.*]] = zext <2 x i1> [[TMP9]] to <2 x i8>
16 ; CHECK-NEXT: [[TMP12:%.*]] = shufflevector <2 x i8> [[TMP16]], <2 x i8> [[TMP11]], <2 x i32> <i32 0, i32 3>
17 ; CHECK-NEXT: [[TMP13:%.*]] = extractelement <2 x i8> [[TMP12]], i32 0
18 ; CHECK-NEXT: [[DOTNEG:%.*]] = sext i8 [[TMP13]] to i32
19 ; CHECK-NEXT: [[TMP15:%.*]] = extractelement <2 x i8> [[TMP12]], i32 1
20 ; CHECK-NEXT: [[TMP8:%.*]] = zext i8 [[TMP15]] to i32
21 ; CHECK-NEXT: [[TMP10:%.*]] = add nsw i32 [[DOTNEG]], [[TMP8]]
22 ; CHECK-NEXT: ret i32 [[TMP10]]
24 %3 = load i64, ptr inttoptr (i64 32 to ptr), align 32
25 %4 = load ptr, ptr %1, align 8
26 %5 = getelementptr inbounds i8, ptr %4, i64 32
27 %6 = load i64, ptr %5, align 8
28 %7 = icmp ne i64 %3, 0
29 %8 = zext i1 %7 to i32
30 %9 = icmp ne i64 %6, 0
31 %.neg = sext i1 %9 to i32
32 %10 = add nsw i32 %.neg, %8