@@ -138,8 +138,8 @@ define <4 x i64> @m2_splat_two_source(<4 x i64> %v1, <4 x i64> %v2) vscale_range
138138 ret <4 x i64 > %res
139139}
140140
141- define <4 x i64 > @m2_splat_into_identity_two_source (<4 x i64 > %v1 , <4 x i64 > %v2 ) vscale_range(2 ,2 ) {
142- ; CHECK-LABEL: m2_splat_into_identity_two_source :
141+ define <4 x i64 > @m2_splat_into_identity_two_source_v2_hi (<4 x i64 > %v1 , <4 x i64 > %v2 ) vscale_range(2 ,2 ) {
142+ ; CHECK-LABEL: m2_splat_into_identity_two_source_v2_hi :
143143; CHECK: # %bb.0:
144144; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma
145145; CHECK-NEXT: vrgather.vi v10, v8, 0
@@ -149,6 +149,20 @@ define <4 x i64> @m2_splat_into_identity_two_source(<4 x i64> %v1, <4 x i64> %v2
149149 ret <4 x i64 > %res
150150}
151151
152+ ; FIXME: This is a miscompile, we're clobbering the lower reg group of %v2
153+ ; (v10), and the vmv1r.v is moving from the wrong reg group (should be v10)
154+ define <4 x i64 > @m2_splat_into_slide_two_source_v2_lo (<4 x i64 > %v1 , <4 x i64 > %v2 ) vscale_range(2 ,2 ) {
155+ ; CHECK-LABEL: m2_splat_into_slide_two_source_v2_lo:
156+ ; CHECK: # %bb.0:
157+ ; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma
158+ ; CHECK-NEXT: vrgather.vi v10, v8, 0
159+ ; CHECK-NEXT: vmv1r.v v11, v8
160+ ; CHECK-NEXT: vmv2r.v v8, v10
161+ ; CHECK-NEXT: ret
162+ %res = shufflevector <4 x i64 > %v1 , <4 x i64 > %v2 , <4 x i32 > <i32 0 , i32 0 , i32 4 , i32 5 >
163+ ret <4 x i64 > %res
164+ }
165+
152166define <4 x i64 > @m2_splat_into_slide_two_source (<4 x i64 > %v1 , <4 x i64 > %v2 ) vscale_range(2 ,2 ) {
153167; CHECK-LABEL: m2_splat_into_slide_two_source:
154168; CHECK: # %bb.0:
0 commit comments