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/rvv-peephole-vmerge-vops.ll
+44Lines changed: 44 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1202,4 +1202,48 @@ define <vscale x 2 x i64> @vpmerge_vwsub.w_tied(<vscale x 2 x i64> %passthru, <v
1202
1202
%a = call <vscale x 2 x i64> @llvm.riscv.vwsub.w.nxv2i64.nxv2i32(<vscale x 2 x i64> %passthru, <vscale x 2 x i64> %passthru, <vscale x 2 x i32> %y, i64%vl.zext)
1203
1203
%b = call <vscale x 2 x i64> @llvm.vp.merge.nxv2i64(<vscale x 2 x i1> %mask, <vscale x 2 x i64> %a, <vscale x 2 x i64> %passthru, i32%vl)
1204
1204
ret <vscale x 2 x i64> %b
1205
+
1206
+
; FIXME: We don't currently handle vmerge with an implicit passthru if the true
1207
+
; operand also has a tied dest. This could be folded into a masked vmacc with ta
1208
+
; policy.
1209
+
define <vscale x 2 x i32> @true_tied_dest_vmerge_implicit_passthru(<vscale x 2 x i32> %passthru, <vscale x 2 x i32> %x, <vscale x 2 x i32> %y, <vscale x 2 x i1> %m, i64%avl) {
%a = call <vscale x 2 x i32> @llvm.riscv.vmacc.nxv2i32.nxv2i32(<vscale x 2 x i32> %passthru, <vscale x 2 x i32> %x, <vscale x 2 x i32> %y, i64%avl, i640)
1219
+
%b = call <vscale x 2 x i32> @llvm.riscv.vmerge.nxv2i32.nxv2i32(
1220
+
<vscale x 2 x i32> poison,
1221
+
<vscale x 2 x i32> %passthru,
1222
+
<vscale x 2 x i32> %a,
1223
+
<vscale x 2 x i1> %m,
1224
+
i64%avl
1225
+
)
1226
+
ret <vscale x 2 x i32> %b
1227
+
}
1228
+
1229
+
; FIXME: We don't currently handle vmerge with an implicit passthru if the true
1230
+
; operand also has a tied dest, e.g. has a passthru since it's a masked
1231
+
; pseudo. This could be folded into a masked vadd with ta policy.
1232
+
define <vscale x 2 x i32> @true_mask_vmerge_implicit_passthru(<vscale x 2 x i32> %passthru, <vscale x 2 x i32> %x, <vscale x 2 x i32> %y, <vscale x 2 x i1> %m, i64%avl) {
%a = call <vscale x 2 x i32> @llvm.riscv.vadd.mask.nxv2i32.nxv2i32(<vscale x 2 x i32> %passthru, <vscale x 2 x i32> %x, <vscale x 2 x i32> %y, <vscale x 2 x i1> %m, i64%avl, i640)
1241
+
%b = call <vscale x 2 x i32> @llvm.riscv.vmerge.nxv2i32.nxv2i32(
1242
+
<vscale x 2 x i32> poison,
1243
+
<vscale x 2 x i32> %passthru,
1244
+
<vscale x 2 x i32> %a,
1245
+
<vscale x 2 x i1> shufflevector(<vscale x 2 x i1> insertelement(<vscale x 2 x i1> poison, i1true, i320), <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer),
0 commit comments