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
+49Lines changed: 49 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1187,3 +1187,52 @@ define <vscale x 2 x i32> @vmerge_larger_vl_false_becomes_tail(<vscale x 2 x i32
1187
1187
%b = call <vscale x 2 x i32> @llvm.riscv.vmerge.nxv2i32.nxv2i32(<vscale x 2 x i32> poison, <vscale x 2 x i32> %false, <vscale x 2 x i32> %a, <vscale x 2 x i1> %m, i643)
1188
1188
ret <vscale x 2 x i32> %b
1189
1189
}
1190
+
1191
+
declare <vscale x 2 x i32> @llvm.riscv.vmacc.nxv2i32.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32>, i64, i64)
1192
+
1193
+
; FIXME: We don't currently handle vmerge with an implicit passthru if the true
1194
+
; operand also has a tied dest. This could be folded into a masked vmacc with ta
1195
+
; policy.
1196
+
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)
1206
+
%b = call <vscale x 2 x i32> @llvm.riscv.vmerge.nxv2i32.nxv2i32(
1207
+
<vscale x 2 x i32> poison,
1208
+
<vscale x 2 x i32> %passthru,
1209
+
<vscale x 2 x i32> %a,
1210
+
<vscale x 2 x i1> %m,
1211
+
i64%avl
1212
+
)
1213
+
ret <vscale x 2 x i32> %b
1214
+
}
1215
+
1216
+
declare <vscale x 2 x i32> @llvm.riscv.vadd.mask.nxv2i32.i32(<vscale x 2 x i32>, <vscale x 2 x i32>, i32, <vscale x 2 x i1>, i64, i64)
1217
+
1218
+
; FIXME: We don't currently handle vmerge with an implicit passthru if the true
1219
+
; operand also has a tied dest, e.g. has a passthru since it's a masked
1220
+
; pseudo. This could be folded into a masked vadd with ta policy.
1221
+
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)
1230
+
%b = call <vscale x 2 x i32> @llvm.riscv.vmerge.nxv2i32.nxv2i32(
1231
+
<vscale x 2 x i32> poison,
1232
+
<vscale x 2 x i32> %passthru,
1233
+
<vscale x 2 x i32> %a,
1234
+
<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