1
1
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2
- ; RUN: opt -S -passes=instcombine < %s | FileCheck %s --check-prefixes=CHECK,LITTLE
3
- ; RUN: opt -S -passes=instcombine -data-layout="E" < %s | FileCheck %s --check-prefixes=CHECK,BIG
2
+ ; RUN: opt -S -passes=instcombine -use-constant-int-for-scalable-splat=false -use-constant-fp-for-scalable-splat=false < %s | FileCheck %s --check-prefixes=CHECK,CHECK-CV,LITTLE,LITTLE-CV
3
+ ; RUN: opt -S -passes=instcombine -use-constant-int-for-scalable-splat -use-constant-fp-for-scalable-splat < %s | FileCheck %s --check-prefixes=CHECK,CHECK-CI,LITTLE,LITTLE-CI
4
+ ; RUN: opt -S -passes=instcombine -data-layout="E" -use-constant-int-for-scalable-splat=false -use-constant-fp-for-scalable-splat=false < %s | FileCheck %s --check-prefixes=CHECK,CHECK-CV,BIG,BIG-CV
5
+ ; RUN: opt -S -passes=instcombine -data-layout="E" -use-constant-int-for-scalable-splat -use-constant-fp-for-scalable-splat < %s | FileCheck %s --check-prefixes=CHECK,CHECK-CI,BIG,BIG-CI
4
6
5
7
define i8 @load_smaller_int (ptr %p ) {
6
8
; LITTLE-LABEL: @load_smaller_int(
@@ -101,11 +103,16 @@ define i32 @vec_store_load_overlap(ptr %p) {
101
103
}
102
104
103
105
define i32 @load_i32_store_nxv4i32 (ptr %a ) {
104
- ; CHECK-LABEL: @load_i32_store_nxv4i32(
105
- ; CHECK-NEXT: entry:
106
- ; CHECK-NEXT: store <vscale x 4 x i32> splat (i32 1), ptr [[A:%.*]], align 16
107
- ; CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[A]], align 4
108
- ; CHECK-NEXT: ret i32 [[TMP0]]
106
+ ; CHECK-CV-LABEL: @load_i32_store_nxv4i32(
107
+ ; CHECK-CV-NEXT: entry:
108
+ ; CHECK-CV-NEXT: store <vscale x 4 x i32> splat (i32 1), ptr [[A:%.*]], align 16
109
+ ; CHECK-CV-NEXT: [[TMP0:%.*]] = load i32, ptr [[A]], align 4
110
+ ; CHECK-CV-NEXT: ret i32 [[TMP0]]
111
+ ;
112
+ ; CHECK-CI-LABEL: @load_i32_store_nxv4i32(
113
+ ; CHECK-CI-NEXT: entry:
114
+ ; CHECK-CI-NEXT: store <vscale x 4 x i32> splat (i32 1), ptr [[A:%.*]], align 16
115
+ ; CHECK-CI-NEXT: ret i32 1
109
116
;
110
117
entry:
111
118
store <vscale x 4 x i32 > splat (i32 1 ), ptr %a , align 16
@@ -153,11 +160,16 @@ entry:
153
160
}
154
161
155
162
define float @load_f32_store_nxv4f32 (ptr %a ) {
156
- ; CHECK-LABEL: @load_f32_store_nxv4f32(
157
- ; CHECK-NEXT: entry:
158
- ; CHECK-NEXT: store <vscale x 4 x float> splat (float 1.000000e+00), ptr [[A:%.*]], align 16
159
- ; CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[A]], align 4
160
- ; CHECK-NEXT: ret float [[TMP0]]
163
+ ; CHECK-CV-LABEL: @load_f32_store_nxv4f32(
164
+ ; CHECK-CV-NEXT: entry:
165
+ ; CHECK-CV-NEXT: store <vscale x 4 x float> splat (float 1.000000e+00), ptr [[A:%.*]], align 16
166
+ ; CHECK-CV-NEXT: [[TMP0:%.*]] = load float, ptr [[A]], align 4
167
+ ; CHECK-CV-NEXT: ret float [[TMP0]]
168
+ ;
169
+ ; CHECK-CI-LABEL: @load_f32_store_nxv4f32(
170
+ ; CHECK-CI-NEXT: entry:
171
+ ; CHECK-CI-NEXT: store <vscale x 4 x float> splat (float 1.000000e+00), ptr [[A:%.*]], align 16
172
+ ; CHECK-CI-NEXT: ret float 1.000000e+00
161
173
;
162
174
entry:
163
175
store <vscale x 4 x float > splat (float 1 .0 ), ptr %a , align 16
@@ -166,11 +178,16 @@ entry:
166
178
}
167
179
168
180
define i32 @load_i32_store_nxv4f32 (ptr %a ) {
169
- ; CHECK-LABEL: @load_i32_store_nxv4f32(
170
- ; CHECK-NEXT: entry:
171
- ; CHECK-NEXT: store <vscale x 4 x float> splat (float 1.000000e+00), ptr [[A:%.*]], align 16
172
- ; CHECK-NEXT: [[LOAD:%.*]] = load i32, ptr [[A]], align 4
173
- ; CHECK-NEXT: ret i32 [[LOAD]]
181
+ ; CHECK-CV-LABEL: @load_i32_store_nxv4f32(
182
+ ; CHECK-CV-NEXT: entry:
183
+ ; CHECK-CV-NEXT: store <vscale x 4 x float> splat (float 1.000000e+00), ptr [[A:%.*]], align 16
184
+ ; CHECK-CV-NEXT: [[LOAD:%.*]] = load i32, ptr [[A]], align 4
185
+ ; CHECK-CV-NEXT: ret i32 [[LOAD]]
186
+ ;
187
+ ; CHECK-CI-LABEL: @load_i32_store_nxv4f32(
188
+ ; CHECK-CI-NEXT: entry:
189
+ ; CHECK-CI-NEXT: store <vscale x 4 x float> splat (float 1.000000e+00), ptr [[A:%.*]], align 16
190
+ ; CHECK-CI-NEXT: ret i32 1065353216
174
191
;
175
192
entry:
176
193
store <vscale x 4 x float > splat (float 1 .0 ), ptr %a , align 16
@@ -506,3 +523,8 @@ define <vscale x 1 x i32> @load_after_memset_0_scalable(ptr %a) {
506
523
}
507
524
508
525
declare void @llvm.memset.p0.i64 (ptr , i8 , i64 , i1 )
526
+ ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
527
+ ; BIG-CI: {{.*}}
528
+ ; BIG-CV: {{.*}}
529
+ ; LITTLE-CI: {{.*}}
530
+ ; LITTLE-CV: {{.*}}
0 commit comments