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/vwadd-sdnode.ll
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1392,3 +1392,25 @@ define <vscale x 1 x i64> @i1_zext(<vscale x 1 x i1> %va, <vscale x 1 x i64> %vb
1392
1392
storei942, ptr%p
1393
1393
ret <vscale x 1 x i64> %vd
1394
1394
}
1395
+
1396
+
; %x.i32 and %y.i32 are disjoint, so DAGCombiner will combine it into an or.
1397
+
; FIXME: We should be able to recover the or into vwaddu.vv if the disjoint
1398
+
; flag is set.
1399
+
define <vscale x 2 x i32> @disjoint_or(<vscale x 2 x i8> %x.i8, <vscale x 2 x i8> %y.i8) {
1400
+
; CHECK-LABEL: disjoint_or:
1401
+
; CHECK: # %bb.0:
1402
+
; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
1403
+
; CHECK-NEXT: vzext.vf2 v10, v8
1404
+
; CHECK-NEXT: vsll.vi v8, v10, 8
1405
+
; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1406
+
; CHECK-NEXT: vzext.vf2 v10, v8
1407
+
; CHECK-NEXT: vzext.vf4 v8, v9
1408
+
; CHECK-NEXT: vor.vv v8, v10, v8
1409
+
; CHECK-NEXT: ret
1410
+
%x.i16 = zext <vscale x 2 x i8> %x.i8to <vscale x 2 x i16>
1411
+
%x.shl = shl <vscale x 2 x i16> %x.i16, shufflevector(<vscale x 2 x i16> insertelement(<vscale x 2 x i16> poison, i168, i320), <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer)
1412
+
%x.i32 = zext <vscale x 2 x i16> %x.shlto <vscale x 2 x i32>
1413
+
%y.i32 = zext <vscale x 2 x i8> %y.i8to <vscale x 2 x i32>
0 commit comments