1
1
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2
- ; RUN: opt < %s -O3 -S -mtriple=x86_64-- -mcpu=x86-64 | FileCheck %s
3
- ; RUN: opt < %s -O3 -S -mtriple=x86_64-- -mcpu=x86-64-v2 | FileCheck %s
4
- ; RUN: opt < %s -O3 -S -mtriple=x86_64-- -mcpu=x86-64-v3 | FileCheck %s
5
- ; RUN: opt < %s -O3 -S -mtriple=x86_64-- -mcpu=x86-64-v4 | FileCheck %s
2
+ ; RUN: opt < %s -passes=vector-combine -S -mtriple=x86_64-- -mcpu=x86-64 | FileCheck %s
3
+ ; RUN: opt < %s -passes=vector-combine -S -mtriple=x86_64-- -mcpu=x86-64-v2 | FileCheck %s
4
+ ; RUN: opt < %s -passes=vector-combine -S -mtriple=x86_64-- -mcpu=x86-64-v3 | FileCheck %s
5
+ ; RUN: opt < %s -passes=vector-combine -S -mtriple=x86_64-- -mcpu=x86-64-v4 | FileCheck %s
6
6
7
7
define i32 @movmsk_i32_v32i8_v16i8 (<16 x i8 > %v0 , <16 x i8 > %v1 ) {
8
8
; CHECK-LABEL: @movmsk_i32_v32i8_v16i8(
@@ -35,7 +35,7 @@ define i32 @movmsk_i32_v8i32_v4i32(<4 x i32> %v0, <4 x i32> %v1) {
35
35
; CHECK-NEXT: [[B1:%.*]] = bitcast <4 x i1> [[C1]] to i4
36
36
; CHECK-NEXT: [[Z0:%.*]] = zext i4 [[B0]] to i32
37
37
; CHECK-NEXT: [[Z1:%.*]] = zext i4 [[B1]] to i32
38
- ; CHECK-NEXT: [[S0:%.*]] = shl nuw nsw i32 [[Z0]], 4
38
+ ; CHECK-NEXT: [[S0:%.*]] = shl nuw i32 [[Z0]], 4
39
39
; CHECK-NEXT: [[OR:%.*]] = or disjoint i32 [[S0]], [[Z1]]
40
40
; CHECK-NEXT: ret i32 [[OR]]
41
41
;
@@ -58,7 +58,7 @@ define i64 @movmsk_i64_v32i8_v16i8(<16 x i8> %v0, <16 x i8> %v1) {
58
58
; CHECK-NEXT: [[B1:%.*]] = bitcast <16 x i1> [[C1]] to i16
59
59
; CHECK-NEXT: [[Z0:%.*]] = zext i16 [[B0]] to i64
60
60
; CHECK-NEXT: [[Z1:%.*]] = zext i16 [[B1]] to i64
61
- ; CHECK-NEXT: [[S0:%.*]] = shl nuw nsw i64 [[Z0]], 16
61
+ ; CHECK-NEXT: [[S0:%.*]] = shl nuw i64 [[Z0]], 16
62
62
; CHECK-NEXT: [[OR:%.*]] = or disjoint i64 [[S0]], [[Z1]]
63
63
; CHECK-NEXT: ret i64 [[OR]]
64
64
;
@@ -81,7 +81,7 @@ define i64 @movmsk_i64_v8i32_v4i32(<4 x i32> %v0, <4 x i32> %v1) {
81
81
; CHECK-NEXT: [[B1:%.*]] = bitcast <4 x i1> [[C1]] to i4
82
82
; CHECK-NEXT: [[Z0:%.*]] = zext i4 [[B0]] to i64
83
83
; CHECK-NEXT: [[Z1:%.*]] = zext i4 [[B1]] to i64
84
- ; CHECK-NEXT: [[S0:%.*]] = shl nuw nsw i64 [[Z0]], 4
84
+ ; CHECK-NEXT: [[S0:%.*]] = shl nuw i64 [[Z0]], 4
85
85
; CHECK-NEXT: [[OR:%.*]] = or disjoint i64 [[S0]], [[Z1]]
86
86
; CHECK-NEXT: ret i64 [[OR]]
87
87
;
@@ -111,11 +111,11 @@ define i64 @movmsk_i64_v64i8_v16i8(<16 x i8> %v0, <16 x i8> %v1, <16 x i8> %v2,
111
111
; CHECK-NEXT: [[Z2:%.*]] = zext i16 [[B2]] to i64
112
112
; CHECK-NEXT: [[Z3:%.*]] = zext i16 [[B3]] to i64
113
113
; CHECK-NEXT: [[S0:%.*]] = shl nuw i64 [[Z0]], 48
114
- ; CHECK-NEXT: [[S1:%.*]] = shl nuw nsw i64 [[Z1]], 32
115
- ; CHECK-NEXT: [[S2:%.*]] = shl nuw nsw i64 [[Z2]], 16
116
- ; CHECK-NEXT: [[OR0:%.*]] = or disjoint i64 [[S1 ]], [[S0 ]]
114
+ ; CHECK-NEXT: [[S1:%.*]] = shl nuw i64 [[Z1]], 32
115
+ ; CHECK-NEXT: [[S2:%.*]] = shl nuw i64 [[Z2]], 16
116
+ ; CHECK-NEXT: [[OR0:%.*]] = or disjoint i64 [[S0 ]], [[S1 ]]
117
117
; CHECK-NEXT: [[OR1:%.*]] = or disjoint i64 [[S2]], [[Z3]]
118
- ; CHECK-NEXT: [[OR:%.*]] = or disjoint i64 [[OR1 ]], [[OR0 ]]
118
+ ; CHECK-NEXT: [[OR:%.*]] = or disjoint i64 [[OR0 ]], [[OR1 ]]
119
119
; CHECK-NEXT: ret i64 [[OR]]
120
120
;
121
121
%c0 = icmp slt <16 x i8 > %v0 , zeroinitializer
@@ -153,12 +153,12 @@ define i64 @movmsk_i64_v32i32_v4i32(<4 x i32> %v0, <4 x i32> %v1, <4 x i32> %v2,
153
153
; CHECK-NEXT: [[Z1:%.*]] = zext i4 [[B1]] to i64
154
154
; CHECK-NEXT: [[Z2:%.*]] = zext i4 [[B2]] to i64
155
155
; CHECK-NEXT: [[Z3:%.*]] = zext i4 [[B3]] to i64
156
- ; CHECK-NEXT: [[S0 :%.*]] = shl nuw nsw i64 [[Z0]], 12
157
- ; CHECK-NEXT: [[S1 :%.*]] = shl nuw nsw i64 [[Z1]], 8
158
- ; CHECK-NEXT: [[S2:%.*]] = shl nuw nsw i64 [[Z2]], 4
156
+ ; CHECK-NEXT: [[S1 :%.*]] = shl nuw i64 [[Z0]], 12
157
+ ; CHECK-NEXT: [[S0 :%.*]] = shl nuw i64 [[Z1]], 8
158
+ ; CHECK-NEXT: [[S2:%.*]] = shl nuw i64 [[Z2]], 4
159
159
; CHECK-NEXT: [[OR0:%.*]] = or disjoint i64 [[S1]], [[S0]]
160
160
; CHECK-NEXT: [[OR1:%.*]] = or disjoint i64 [[S2]], [[Z3]]
161
- ; CHECK-NEXT: [[OR:%.*]] = or disjoint i64 [[OR1 ]], [[OR0 ]]
161
+ ; CHECK-NEXT: [[OR:%.*]] = or disjoint i64 [[OR0 ]], [[OR1 ]]
162
162
; CHECK-NEXT: ret i64 [[OR]]
163
163
;
164
164
%c0 = icmp slt <4 x i32 > %v0 , zeroinitializer
@@ -213,7 +213,7 @@ define i32 @movmsk_i32_v16i32_v8i32(<8 x i32> %v0, <8 x i32> %v1) {
213
213
; CHECK-NEXT: [[B1:%.*]] = bitcast <8 x i1> [[C1]] to i8
214
214
; CHECK-NEXT: [[Z0:%.*]] = zext i8 [[B0]] to i32
215
215
; CHECK-NEXT: [[Z1:%.*]] = zext i8 [[B1]] to i32
216
- ; CHECK-NEXT: [[S0:%.*]] = shl nuw nsw i32 [[Z0]], 8
216
+ ; CHECK-NEXT: [[S0:%.*]] = shl nuw i32 [[Z0]], 8
217
217
; CHECK-NEXT: [[OR:%.*]] = or disjoint i32 [[S0]], [[Z1]]
218
218
; CHECK-NEXT: ret i32 [[OR]]
219
219
;
0 commit comments