llvm.org GIT mirror llvm / dabf82a
[SLP] Fix invalid triple in X86 tests x86-64 is an invalid architecture in triples. Changing it to the correct triple (x86_64) changes some tests, because SLP is not deemed profitable any more. Reviewers: ABataev, RKSimon, spatel Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D58931 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355420 91177308-0d34-0410-b5e6-96231b3b80d8 Florian Hahn 7 months ago
2 changed file(s) with 37 addition(s) and 30 deletion(s). Raw diff Collapse all Expand all
0 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
1 ; RUN: opt < %s -slp-vectorizer -S -o - -mtriple=x86-64-unknown-linux -mcpu=bdver2 -instcombine | FileCheck %s
1 ; RUN: opt < %s -slp-vectorizer -S -o - -mtriple=x86_64-unknown-linux -mcpu=bdver2 -instcombine | FileCheck %s
22
33 define <2 x i8> @g(<2 x i8> %x, <2 x i8> %y) {
44 ; CHECK-LABEL: @g(
5 ; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <2 x i8> [[X:%.*]], <2 x i8> [[Y:%.*]], <2 x i32>
6 ; CHECK-NEXT: [[TMP2:%.*]] = mul <2 x i8> [[TMP1]], [[TMP1]]
7 ; CHECK-NEXT: ret <2 x i8> [[TMP2]]
5 ; CHECK-NEXT: [[X0:%.*]] = extractelement <2 x i8> [[X:%.*]], i32 0
6 ; CHECK-NEXT: [[Y1:%.*]] = extractelement <2 x i8> [[Y:%.*]], i32 1
7 ; CHECK-NEXT: [[X0X0:%.*]] = mul i8 [[X0]], [[X0]]
8 ; CHECK-NEXT: [[Y1Y1:%.*]] = mul i8 [[Y1]], [[Y1]]
9 ; CHECK-NEXT: [[INS1:%.*]] = insertelement <2 x i8> undef, i8 [[X0X0]], i32 0
10 ; CHECK-NEXT: [[INS2:%.*]] = insertelement <2 x i8> [[INS1]], i8 [[Y1Y1]], i32 1
11 ; CHECK-NEXT: ret <2 x i8> [[INS2]]
812 ;
913 %x0 = extractelement <2 x i8> %x, i32 0
1014 %y1 = extractelement <2 x i8> %y, i32 1
8488
8589 define i8 @j(<4 x i8> %x, <4 x i8> %y) {
8690 ; CHECK-LABEL: @j(
87 ; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x i8> [[X:%.*]], <4 x i8> [[Y:%.*]], <2 x i32>
88 ; CHECK-NEXT: [[TMP2:%.*]] = mul <2 x i8> [[TMP1]], [[TMP1]]
89 ; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x i8> [[X]], <4 x i8> [[Y]], <2 x i32>
90 ; CHECK-NEXT: [[TMP4:%.*]] = mul <2 x i8> [[TMP3]], [[TMP3]]
91 ; CHECK-NEXT: [[TMP5:%.*]] = add <2 x i8> [[TMP2]], [[TMP4]]
92 ; CHECK-NEXT: [[TMP6:%.*]] = extractelement <2 x i8> [[TMP5]], i32 0
93 ; CHECK-NEXT: [[TMP7:%.*]] = extractelement <2 x i8> [[TMP5]], i32 1
94 ; CHECK-NEXT: [[TMP8:%.*]] = sdiv i8 [[TMP6]], [[TMP7]]
95 ; CHECK-NEXT: ret i8 [[TMP8]]
91 ; CHECK-NEXT: [[X0:%.*]] = extractelement <4 x i8> [[X:%.*]], i32 0
92 ; CHECK-NEXT: [[X3:%.*]] = extractelement <4 x i8> [[X]], i32 3
93 ; CHECK-NEXT: [[Y1:%.*]] = extractelement <4 x i8> [[Y:%.*]], i32 1
94 ; CHECK-NEXT: [[Y2:%.*]] = extractelement <4 x i8> [[Y]], i32 2
95 ; CHECK-NEXT: [[X0X0:%.*]] = mul i8 [[X0]], [[X0]]
96 ; CHECK-NEXT: [[X3X3:%.*]] = mul i8 [[X3]], [[X3]]
97 ; CHECK-NEXT: [[Y1Y1:%.*]] = mul i8 [[Y1]], [[Y1]]
98 ; CHECK-NEXT: [[Y2Y2:%.*]] = mul i8 [[Y2]], [[Y2]]
99 ; CHECK-NEXT: [[TMP1:%.*]] = add i8 [[X0X0]], [[X3X3]]
100 ; CHECK-NEXT: [[TMP2:%.*]] = add i8 [[Y1Y1]], [[Y2Y2]]
101 ; CHECK-NEXT: [[TMP3:%.*]] = sdiv i8 [[TMP1]], [[TMP2]]
102 ; CHECK-NEXT: ret i8 [[TMP3]]
96103 ;
97104 %x0 = extractelement <4 x i8> %x, i32 0
98105 %x3 = extractelement <4 x i8> %x, i32 3
110117
111118 define i8 @k(<4 x i8> %x) {
112119 ; CHECK-LABEL: @k(
113 ; CHECK-NEXT: [[TMP1:%.*]] = mul <4 x i8> [[X:%.*]], [[X]]
114 ; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <4 x i8> [[TMP1]], <4 x i8> undef, <2 x i32>
115 ; CHECK-NEXT: [[TMP3:%.*]] = mul <4 x i8> [[X]], [[X]]
116 ; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <4 x i8> [[TMP3]], <4 x i8> undef, <2 x i32>
117 ; CHECK-NEXT: [[TMP5:%.*]] = add <2 x i8> [[TMP2]], [[TMP4]]
118 ; CHECK-NEXT: [[TMP6:%.*]] = extractelement <2 x i8> [[TMP5]], i32 0
119 ; CHECK-NEXT: [[TMP7:%.*]] = extractelement <2 x i8> [[TMP5]], i32 1
120 ; CHECK-NEXT: [[TMP8:%.*]] = sdiv i8 [[TMP6]], [[TMP7]]
121 ; CHECK-NEXT: ret i8 [[TMP8]]
120 ; CHECK-NEXT: [[X0:%.*]] = extractelement <4 x i8> [[X:%.*]], i32 0
121 ; CHECK-NEXT: [[X3:%.*]] = extractelement <4 x i8> [[X]], i32 3
122 ; CHECK-NEXT: [[X1:%.*]] = extractelement <4 x i8> [[X]], i32 1
123 ; CHECK-NEXT: [[X2:%.*]] = extractelement <4 x i8> [[X]], i32 2
124 ; CHECK-NEXT: [[X0X0:%.*]] = mul i8 [[X0]], [[X0]]
125 ; CHECK-NEXT: [[X3X3:%.*]] = mul i8 [[X3]], [[X3]]
126 ; CHECK-NEXT: [[X1X1:%.*]] = mul i8 [[X1]], [[X1]]
127 ; CHECK-NEXT: [[X2X2:%.*]] = mul i8 [[X2]], [[X2]]
128 ; CHECK-NEXT: [[TMP1:%.*]] = add i8 [[X0X0]], [[X3X3]]
129 ; CHECK-NEXT: [[TMP2:%.*]] = add i8 [[X1X1]], [[X2X2]]
130 ; CHECK-NEXT: [[TMP3:%.*]] = sdiv i8 [[TMP1]], [[TMP2]]
131 ; CHECK-NEXT: ret i8 [[TMP3]]
122132 ;
123133 %x0 = extractelement <4 x i8> %x, i32 0
124134 %x3 = extractelement <4 x i8> %x, i32 3
0 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
1 ; RUN: opt < %s -slp-vectorizer -S -o - -mtriple=x86-64-unknown-linux -mcpu=bdver2 -slp-schedule-budget=1 | FileCheck %s
1 ; RUN: opt < %s -slp-vectorizer -S -o - -mtriple=x86_64-unknown-linux -mcpu=bdver2 -slp-schedule-budget=1 | FileCheck %s
22
33 define <2 x i8> @g(<2 x i8> %x, <2 x i8> %y) {
44 ; CHECK-LABEL: @g(
55 ; CHECK-NEXT: [[X0:%.*]] = extractelement <2 x i8> [[X:%.*]], i32 0
66 ; CHECK-NEXT: [[Y1:%.*]] = extractelement <2 x i8> [[Y:%.*]], i32 1
7 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x i8> undef, i8 [[X0]], i32 0
8 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x i8> [[TMP1]], i8 [[Y1]], i32 1
9 ; CHECK-NEXT: [[TMP3:%.*]] = mul <2 x i8> [[TMP2]], [[TMP2]]
10 ; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x i8> [[TMP3]], i32 0
11 ; CHECK-NEXT: [[INS1:%.*]] = insertelement <2 x i8> undef, i8 [[TMP4]], i32 0
12 ; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x i8> [[TMP3]], i32 1
13 ; CHECK-NEXT: [[INS2:%.*]] = insertelement <2 x i8> [[INS1]], i8 [[TMP5]], i32 1
7 ; CHECK-NEXT: [[X0X0:%.*]] = mul i8 [[X0]], [[X0]]
8 ; CHECK-NEXT: [[Y1Y1:%.*]] = mul i8 [[Y1]], [[Y1]]
9 ; CHECK-NEXT: [[INS1:%.*]] = insertelement <2 x i8> undef, i8 [[X0X0]], i32 0
10 ; CHECK-NEXT: [[INS2:%.*]] = insertelement <2 x i8> [[INS1]], i8 [[Y1Y1]], i32 1
1411 ; CHECK-NEXT: ret <2 x i8> [[INS2]]
1512 ;
1613 %x0 = extractelement <2 x i8> %x, i32 0