1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2 ; RUN: opt < %s -passes=slp-vectorizer -S | FileCheck %s
4 target triple = "x86_64-unknown-linux-gnu"
6 define <3 x i64> @ahyes(i64 %position, i64 %value) {
7 ; CHECK-LABEL: define <3 x i64> @ahyes(
8 ; CHECK-SAME: i64 [[POSITION:%.*]], i64 [[VALUE:%.*]]) {
10 ; CHECK-NEXT: [[TMP0:%.*]] = insertelement <2 x i64> poison, i64 [[VALUE]], i32 0
11 ; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <2 x i64> [[TMP0]], <2 x i64> poison, <2 x i32> zeroinitializer
12 ; CHECK-NEXT: [[TMP2:%.*]] = add <2 x i64> [[TMP1]], <i64 1, i64 2>
13 ; CHECK-NEXT: [[TMP3:%.*]] = insertelement <3 x i64> poison, i64 [[VALUE]], i64 [[POSITION]]
14 ; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <2 x i64> [[TMP2]], <2 x i64> poison, <3 x i32> <i32 0, i32 1, i32 poison>
15 ; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <3 x i64> [[TMP3]], <3 x i64> [[TMP4]], <3 x i32> <i32 3, i32 4, i32 2>
16 ; CHECK-NEXT: ret <3 x i64> [[TMP5]]
19 %0 = add i64 %value, 1
20 %1 = add i64 %value, 2
21 %2 = insertelement <3 x i64> poison, i64 %value, i64 %position
22 %3 = insertelement <3 x i64> %2, i64 %0, i64 0
23 %4 = insertelement <3 x i64> %3, i64 %1, i64 1