1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s \
3 ; RUN: | FileCheck -check-prefix=RV32I %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s \
5 ; RUN: | FileCheck -check-prefix=RV64I %s
7 define <vscale x 1 x i8> @constraint_vr(<vscale x 1 x i8> %0, <vscale x 1 x i8> %1) nounwind {
8 ; RV32I-LABEL: constraint_vr:
11 ; RV32I-NEXT: vadd.vv v8, v8, v9
15 ; RV64I-LABEL: constraint_vr:
18 ; RV64I-NEXT: vadd.vv v8, v8, v9
21 %a = tail call <vscale x 1 x i8> asm "vadd.vv $0, $1, $2", "=^vr,^vr,^vr"(
22 <vscale x 1 x i8> %0, <vscale x 1 x i8> %1)
23 ret <vscale x 1 x i8> %a
26 define <vscale x 1 x i8> @constraint_vd(<vscale x 1 x i8> %0, <vscale x 1 x i8> %1) nounwind {
27 ; RV32I-LABEL: constraint_vd:
30 ; RV32I-NEXT: vadd.vv v8, v8, v9
34 ; RV64I-LABEL: constraint_vd:
37 ; RV64I-NEXT: vadd.vv v8, v8, v9
40 %a = tail call <vscale x 1 x i8> asm "vadd.vv $0, $1, $2", "=^vd,^vr,^vr"(
41 <vscale x 1 x i8> %0, <vscale x 1 x i8> %1)
42 ret <vscale x 1 x i8> %a
45 define <vscale x 1 x i1> @constraint_vm(<vscale x 1 x i1> %0, <vscale x 1 x i1> %1) nounwind {
46 ; RV32I-LABEL: constraint_vm:
48 ; RV32I-NEXT: vsetivli zero, 1, e8, m1, ta, ma
49 ; RV32I-NEXT: vmv1r.v v9, v0
50 ; RV32I-NEXT: vmv1r.v v0, v8
52 ; RV32I-NEXT: vadd.vv v0, v9, v0
56 ; RV64I-LABEL: constraint_vm:
58 ; RV64I-NEXT: vsetivli zero, 1, e8, m1, ta, ma
59 ; RV64I-NEXT: vmv1r.v v9, v0
60 ; RV64I-NEXT: vmv1r.v v0, v8
62 ; RV64I-NEXT: vadd.vv v0, v9, v0
65 %a = tail call <vscale x 1 x i1> asm "vadd.vv $0, $1, $2", "=^vr,^vr,^vm"(
66 <vscale x 1 x i1> %0, <vscale x 1 x i1> %1)
67 ret <vscale x 1 x i1> %a