%vc = add <vscale x 8 x i64> %va, %splat
ret <vscale x 8 x i64> %vc
}
+
+define <vscale x 8 x i64> @vadd_xx_nxv8i64(i64 %a, i64 %b) nounwind {
+; RV32-LABEL: vadd_xx_nxv8i64:
+; RV32: # %bb.0:
+; RV32-NEXT: addi sp, sp, -16
+; RV32-NEXT: sw a1, 12(sp)
+; RV32-NEXT: sw a0, 8(sp)
+; RV32-NEXT: addi a0, sp, 8
+; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, mu
+; RV32-NEXT: vlse64.v v8, (a0), zero
+; RV32-NEXT: sw a3, 12(sp)
+; RV32-NEXT: sw a2, 8(sp)
+; RV32-NEXT: vlse64.v v16, (a0), zero
+; RV32-NEXT: vadd.vv v8, v8, v16
+; RV32-NEXT: addi sp, sp, 16
+; RV32-NEXT: ret
+;
+; RV64-LABEL: vadd_xx_nxv8i64:
+; RV64: # %bb.0:
+; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, mu
+; RV64-NEXT: vmv.v.x v8, a0
+; RV64-NEXT: vadd.vx v8, v8, a1
+; RV64-NEXT: ret
+ %head1 = insertelement <vscale x 8 x i64> poison, i64 %a, i32 0
+ %splat1 = shufflevector <vscale x 8 x i64> %head1, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
+ %head2 = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
+ %splat2 = shufflevector <vscale x 8 x i64> %head2, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
+ %v = add <vscale x 8 x i64> %splat1, %splat2
+ ret <vscale x 8 x i64> %v
+}
ret <vscale x 8 x i64> %vc
}
+define <vscale x 8 x i64> @vand_xx_nxv8i64(i64 %a, i64 %b) nounwind {
+; RV32-LABEL: vand_xx_nxv8i64:
+; RV32: # %bb.0:
+; RV32-NEXT: addi sp, sp, -16
+; RV32-NEXT: sw a1, 12(sp)
+; RV32-NEXT: sw a0, 8(sp)
+; RV32-NEXT: addi a0, sp, 8
+; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, mu
+; RV32-NEXT: vlse64.v v8, (a0), zero
+; RV32-NEXT: sw a3, 12(sp)
+; RV32-NEXT: sw a2, 8(sp)
+; RV32-NEXT: vlse64.v v16, (a0), zero
+; RV32-NEXT: vand.vv v8, v8, v16
+; RV32-NEXT: addi sp, sp, 16
+; RV32-NEXT: ret
+;
+; RV64-LABEL: vand_xx_nxv8i64:
+; RV64: # %bb.0:
+; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, mu
+; RV64-NEXT: vmv.v.x v8, a0
+; RV64-NEXT: vand.vx v8, v8, a1
+; RV64-NEXT: ret
+ %head1 = insertelement <vscale x 8 x i64> poison, i64 %a, i32 0
+ %splat1 = shufflevector <vscale x 8 x i64> %head1, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
+ %head2 = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
+ %splat2 = shufflevector <vscale x 8 x i64> %head2, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
+ %v = and <vscale x 8 x i64> %splat1, %splat2
+ ret <vscale x 8 x i64> %v
+}
; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV32
; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV64
+; RUN: llc -mtriple=riscv32 -mattr=+v,+m -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV32
+; RUN: llc -mtriple=riscv64 -mattr=+v,+m -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV64
+
define <vscale x 1 x i8> @vmul_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb) {
; CHECK-LABEL: vmul_vv_nxv1i8:
; CHECK: # %bb.0:
%vc = mul <vscale x 8 x i64> %va, %splat
ret <vscale x 8 x i64> %vc
}
+
+define <vscale x 8 x i64> @vmul_xx_nxv8i64(i64 %a, i64 %b) nounwind {
+; RV32-LABEL: vmul_xx_nxv8i64:
+; RV32: # %bb.0:
+; RV32-NEXT: addi sp, sp, -16
+; RV32-NEXT: sw a1, 12(sp)
+; RV32-NEXT: sw a0, 8(sp)
+; RV32-NEXT: addi a0, sp, 8
+; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, mu
+; RV32-NEXT: vlse64.v v8, (a0), zero
+; RV32-NEXT: sw a3, 12(sp)
+; RV32-NEXT: sw a2, 8(sp)
+; RV32-NEXT: vlse64.v v16, (a0), zero
+; RV32-NEXT: vmul.vv v8, v8, v16
+; RV32-NEXT: addi sp, sp, 16
+; RV32-NEXT: ret
+;
+; RV64-LABEL: vmul_xx_nxv8i64:
+; RV64: # %bb.0:
+; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, mu
+; RV64-NEXT: vmv.v.x v8, a0
+; RV64-NEXT: vmul.vx v8, v8, a1
+; RV64-NEXT: ret
+ %head1 = insertelement <vscale x 8 x i64> poison, i64 %a, i32 0
+ %splat1 = shufflevector <vscale x 8 x i64> %head1, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
+ %head2 = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
+ %splat2 = shufflevector <vscale x 8 x i64> %head2, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
+ %v = mul <vscale x 8 x i64> %splat1, %splat2
+ ret <vscale x 8 x i64> %v
+}
%vc = or <vscale x 8 x i64> %va, %splat
ret <vscale x 8 x i64> %vc
}
+
+define <vscale x 8 x i64> @vor_xx_nxv8i64(i64 %a, i64 %b) nounwind {
+; RV32-LABEL: vor_xx_nxv8i64:
+; RV32: # %bb.0:
+; RV32-NEXT: addi sp, sp, -16
+; RV32-NEXT: sw a1, 12(sp)
+; RV32-NEXT: sw a0, 8(sp)
+; RV32-NEXT: addi a0, sp, 8
+; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, mu
+; RV32-NEXT: vlse64.v v8, (a0), zero
+; RV32-NEXT: sw a3, 12(sp)
+; RV32-NEXT: sw a2, 8(sp)
+; RV32-NEXT: vlse64.v v16, (a0), zero
+; RV32-NEXT: vor.vv v8, v8, v16
+; RV32-NEXT: addi sp, sp, 16
+; RV32-NEXT: ret
+;
+; RV64-LABEL: vor_xx_nxv8i64:
+; RV64: # %bb.0:
+; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, mu
+; RV64-NEXT: vmv.v.x v8, a0
+; RV64-NEXT: vor.vx v8, v8, a1
+; RV64-NEXT: ret
+ %head1 = insertelement <vscale x 8 x i64> poison, i64 %a, i32 0
+ %splat1 = shufflevector <vscale x 8 x i64> %head1, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
+ %head2 = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
+ %splat2 = shufflevector <vscale x 8 x i64> %head2, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
+ %v = or <vscale x 8 x i64> %splat1, %splat2
+ ret <vscale x 8 x i64> %v
+}
ret <vscale x 8 x i64> %vc
}
+define <vscale x 8 x i64> @vsub_xx_nxv8i64(i64 %a, i64 %b) nounwind {
+; RV32-LABEL: vsub_xx_nxv8i64:
+; RV32: # %bb.0:
+; RV32-NEXT: addi sp, sp, -16
+; RV32-NEXT: sw a1, 12(sp)
+; RV32-NEXT: sw a0, 8(sp)
+; RV32-NEXT: addi a0, sp, 8
+; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, mu
+; RV32-NEXT: vlse64.v v8, (a0), zero
+; RV32-NEXT: sw a3, 12(sp)
+; RV32-NEXT: sw a2, 8(sp)
+; RV32-NEXT: vlse64.v v16, (a0), zero
+; RV32-NEXT: vsub.vv v8, v8, v16
+; RV32-NEXT: addi sp, sp, 16
+; RV32-NEXT: ret
+;
+; RV64-LABEL: vsub_xx_nxv8i64:
+; RV64: # %bb.0:
+; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, mu
+; RV64-NEXT: vmv.v.x v8, a0
+; RV64-NEXT: vsub.vx v8, v8, a1
+; RV64-NEXT: ret
+ %head1 = insertelement <vscale x 8 x i64> poison, i64 %a, i32 0
+ %splat1 = shufflevector <vscale x 8 x i64> %head1, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
+ %head2 = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
+ %splat2 = shufflevector <vscale x 8 x i64> %head2, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
+ %v = sub <vscale x 8 x i64> %splat1, %splat2
+ ret <vscale x 8 x i64> %v
+}
ret <vscale x 8 x i64> %vc
}
+define <vscale x 8 x i64> @vxor_xx_nxv8i64(i64 %a, i64 %b) nounwind {
+; RV32-LABEL: vxor_xx_nxv8i64:
+; RV32: # %bb.0:
+; RV32-NEXT: addi sp, sp, -16
+; RV32-NEXT: sw a1, 12(sp)
+; RV32-NEXT: sw a0, 8(sp)
+; RV32-NEXT: addi a0, sp, 8
+; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, mu
+; RV32-NEXT: vlse64.v v8, (a0), zero
+; RV32-NEXT: sw a3, 12(sp)
+; RV32-NEXT: sw a2, 8(sp)
+; RV32-NEXT: vlse64.v v16, (a0), zero
+; RV32-NEXT: vxor.vv v8, v8, v16
+; RV32-NEXT: addi sp, sp, 16
+; RV32-NEXT: ret
+;
+; RV64-LABEL: vxor_xx_nxv8i64:
+; RV64: # %bb.0:
+; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, mu
+; RV64-NEXT: vmv.v.x v8, a0
+; RV64-NEXT: vxor.vx v8, v8, a1
+; RV64-NEXT: ret
+ %head1 = insertelement <vscale x 8 x i64> poison, i64 %a, i32 0
+ %splat1 = shufflevector <vscale x 8 x i64> %head1, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
+ %head2 = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
+ %splat2 = shufflevector <vscale x 8 x i64> %head2, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
+ %v = xor <vscale x 8 x i64> %splat1, %splat2
+ ret <vscale x 8 x i64> %v
+}