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
[InstCombine] Handle more scalable geps in EmitGEPOffset (#71699)
Following up on #71565, this makes scalable splats in EmitGEPOffset use
the ElementCount as opposed to assuming it is fixed width, and attempts
to handle scalable offsets with vector geps by splatting the vscale to
each vector lane.
%A = getelementptrinbounds <vscale x 2 x i64>, ptr%P, <2 x i64> zeroinitializer, i64%X
265
+
%B = getelementptrinbounds <vscale x 2 x i64>, ptr%P, <2 x i64> %y
266
+
%C = icmpeq <2 x ptr> %A, %B
267
+
ret <2 x i1> %C
268
+
}
269
+
270
+
define <vscale x 2 x i1> @test13_scalable_scalable(i64%X, ptr%P, <vscale x 2 x i64> %y) nounwind {
271
+
; CHECK-LABEL: @test13_scalable_scalable(
272
+
; CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i64> poison, i64 [[X:%.*]], i64 0
273
+
; CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <vscale x 2 x i64> [[DOTSPLATINSERT]], <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
274
+
; CHECK-NEXT: [[A_IDX:%.*]] = shl nsw <vscale x 2 x i64> [[DOTSPLAT]], shufflevector (<vscale x 2 x i64> insertelement (<vscale x 2 x i64> poison, i64 3, i64 0), <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer)
0 commit comments