1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -slp-vectorizer -S -o - -mtriple=x86_64-unknown-linux -mcpu=bdver2 -slp-schedule-budget=1 | FileCheck %s
4 define <2 x i8> @g(<2 x i8> %x, <2 x i8> %y) {
6 ; CHECK-NEXT: [[X0:%.*]] = extractelement <2 x i8> [[X:%.*]], i32 0
7 ; CHECK-NEXT: [[Y1:%.*]] = extractelement <2 x i8> [[Y:%.*]], i32 1
8 ; CHECK-NEXT: [[X0X0:%.*]] = mul i8 [[X0]], [[X0]]
9 ; CHECK-NEXT: [[Y1Y1:%.*]] = mul i8 [[Y1]], [[Y1]]
10 ; CHECK-NEXT: [[INS1:%.*]] = insertelement <2 x i8> undef, i8 [[X0X0]], i32 0
11 ; CHECK-NEXT: [[INS2:%.*]] = insertelement <2 x i8> [[INS1]], i8 [[Y1Y1]], i32 1
12 ; CHECK-NEXT: ret <2 x i8> [[INS2]]
14 %x0 = extractelement <2 x i8> %x, i32 0
15 %y1 = extractelement <2 x i8> %y, i32 1
16 %x0x0 = mul i8 %x0, %x0
17 %y1y1 = mul i8 %y1, %y1
18 %ins1 = insertelement <2 x i8> undef, i8 %x0x0, i32 0
19 %ins2 = insertelement <2 x i8> %ins1, i8 %y1y1, i32 1