1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=slp-vectorizer -S -o - -mtriple=x86_64-unknown-linux -mcpu=bdver2 -pass-remarks-output=%t | FileCheck %s
3 ; RUN: FileCheck --input-file=%t --check-prefix=YAML %s
6 ; YAML-NEXT: Pass: slp-vectorizer
7 ; YAML-NEXT: Name: NotBeneficial
8 ; YAML-NEXT: Function: g
10 ; YAML-NEXT: - String: 'List vectorization was possible but not beneficial with cost '
11 ; YAML-NEXT: - Cost: '0'
12 ; YAML-NEXT: - String: ' >= '
13 ; YAML-NEXT: - Treshold: '0'
15 define <2 x i32> @g(<2 x i32> %x, i32 %a, i32 %b) {
17 ; CHECK-NEXT: [[X1:%.*]] = extractelement <2 x i32> [[X:%.*]], i32 1
18 ; CHECK-NEXT: [[X1X1:%.*]] = mul i32 [[X1]], [[X1]]
19 ; CHECK-NEXT: [[AB:%.*]] = mul i32 [[A:%.*]], [[B:%.*]]
20 ; CHECK-NEXT: [[INS1:%.*]] = insertelement <2 x i32> poison, i32 [[X1X1]], i32 0
21 ; CHECK-NEXT: [[INS2:%.*]] = insertelement <2 x i32> [[INS1]], i32 [[AB]], i32 1
22 ; CHECK-NEXT: ret <2 x i32> [[INS2]]
24 %x1 = extractelement <2 x i32> %x, i32 1
25 %x1x1 = mul i32 %x1, %x1
27 %ins1 = insertelement <2 x i32> poison, i32 %x1x1, i32 0
28 %ins2 = insertelement <2 x i32> %ins1, i32 %ab, i32 1