1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+m,+d,+zfh,+zvfh,+v -verify-machineinstrs < %s | FileCheck %s
3 ; RUN: llc -mtriple=riscv64 -mattr=+m,+d,+zfh,+zvfh,+v -verify-machineinstrs < %s | FileCheck %s
5 define <vscale x 8 x i1> @not_icmp_sle_nxv8i16(<vscale x 8 x i16> %a, <vscale x 8 x i16> %b) {
6 ; CHECK-LABEL: not_icmp_sle_nxv8i16:
8 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
9 ; CHECK-NEXT: vmslt.vv v0, v10, v8
11 %icmp = icmp sle <vscale x 8 x i16> %a, %b
12 %tmp = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
13 %ones = shufflevector <vscale x 8 x i1> %tmp, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
14 %not = xor <vscale x 8 x i1> %ones, %icmp
15 ret <vscale x 8 x i1> %not
18 define <vscale x 4 x i1> @not_icmp_sgt_nxv4i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
19 ; CHECK-LABEL: not_icmp_sgt_nxv4i32:
21 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
22 ; CHECK-NEXT: vmsle.vv v0, v8, v10
24 %icmp = icmp sgt <vscale x 4 x i32> %a, %b
25 %tmp = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
26 %ones = shufflevector <vscale x 4 x i1> %tmp, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
27 %not = xor <vscale x 4 x i1> %icmp, %ones
28 ret <vscale x 4 x i1> %not
31 define <vscale x 2 x i1> @not_fcmp_une_nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b) {
32 ; CHECK-LABEL: not_fcmp_une_nxv2f64:
34 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
35 ; CHECK-NEXT: vmfeq.vv v0, v8, v10
37 %icmp = fcmp une <vscale x 2 x double> %a, %b
38 %tmp = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
39 %ones = shufflevector <vscale x 2 x i1> %tmp, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
40 %not = xor <vscale x 2 x i1> %icmp, %ones
41 ret <vscale x 2 x i1> %not
44 define <vscale x 4 x i1> @not_fcmp_uge_nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x float> %b) {
45 ; CHECK-LABEL: not_fcmp_uge_nxv4f32:
47 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
48 ; CHECK-NEXT: vmflt.vv v0, v8, v10
50 %icmp = fcmp uge <vscale x 4 x float> %a, %b
51 %tmp = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
52 %ones = shufflevector <vscale x 4 x i1> %tmp, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
53 %not = xor <vscale x 4 x i1> %icmp, %ones
54 ret <vscale x 4 x i1> %not