You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llvm/test/CodeGen/RISCV/rvv/strided-load-store.ll
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -299,6 +299,26 @@ define void @constant_stride(<vscale x 1 x i64> %x, ptr %p, i64 %stride) {
299
299
retvoid
300
300
}
301
301
302
+
define <vscale x 1 x i64> @vector_base_scalar_offset(ptr%p, i64%offset) {
303
+
; CHECK-LABEL: @vector_base_scalar_offset(
304
+
; CHECK-NEXT: [[STEP:%.*]] = call <vscale x 1 x i64> @llvm.experimental.stepvector.nxv1i64()
305
+
; CHECK-NEXT: [[PTRS1:%.*]] = getelementptr i64, ptr [[P:%.*]], <vscale x 1 x i64> [[STEP]]
306
+
; CHECK-NEXT: [[PTRS2:%.*]] = getelementptr i64, <vscale x 1 x ptr> [[PTRS1]], i64 [[OFFSET:%.*]]
307
+
; CHECK-NEXT: [[X:%.*]] = call <vscale x 1 x i64> @llvm.masked.gather.nxv1i64.nxv1p0(<vscale x 1 x ptr> [[PTRS2]], i32 8, <vscale x 1 x i1> shufflevector (<vscale x 1 x i1> insertelement (<vscale x 1 x i1> poison, i1 true, i64 0), <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer), <vscale x 1 x i64> poison)
308
+
; CHECK-NEXT: ret <vscale x 1 x i64> [[X]]
309
+
;
310
+
%step = call <vscale x 1 x i64> @llvm.experimental.stepvector.nxv1i64()
311
+
%ptrs1 = getelementptri64, ptr%p, <vscale x 1 x i64> %step
312
+
%ptrs2 = getelementptri64, <vscale x 1 x ptr> %ptrs1, i64%offset
313
+
%x = call <vscale x 1 x i64> @llvm.masked.gather.nxv1i64.nxv1p0(
314
+
<vscale x 1 x ptr> %ptrs2,
315
+
i328,
316
+
<vscale x 1 x i1> splat (i11),
317
+
<vscale x 1 x i64> poison
318
+
)
319
+
ret <vscale x 1 x i64> %x
320
+
}
321
+
302
322
declarei64@llvm.vscale.i64()
303
323
declarevoid@llvm.masked.scatter.nxv1i64.nxv1p0(<vscale x 1 x i64>, <vscale x 1 x ptr>, i32, <vscale x 1 x i1>)
304
324
declare <vscale x 1 x i64> @llvm.masked.gather.nxv1i64.nxv1p0(<vscale x 1 x ptr>, i32, <vscale x 1 x i1>, <vscale x 1 x i64>)
0 commit comments