|
| 1 | +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py |
| 2 | +// REQUIRES: riscv-registered-target |
| 3 | +// RUN: %clang_cc1 -triple riscv64 -target-feature +v -target-feature +zfh \ |
| 4 | +// RUN: -target-feature +experimental-zvfh -disable-O0-optnone \ |
| 5 | +// RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \ |
| 6 | +// RUN: FileCheck --check-prefix=CHECK-RV64 %s |
| 7 | + |
| 8 | +#include <riscv_vector.h> |
| 9 | + |
| 10 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f16mf4( |
| 11 | +// CHECK-RV64-NEXT: entry: |
| 12 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 1 x half> @llvm.riscv.vfncvt.rod.f.f.w.nxv1f16.nxv1f32.i64(<vscale x 1 x half> poison, <vscale x 1 x float> [[SRC:%.*]], i64 [[VL:%.*]]) |
| 13 | +// CHECK-RV64-NEXT: ret <vscale x 1 x half> [[TMP0]] |
| 14 | +// |
| 15 | +vfloat16mf4_t test_vfncvt_rod_f_f_w_f16mf4(vfloat32mf2_t src, size_t vl) { |
| 16 | + return __riscv_vfncvt_rod_f_f_w_f16mf4(src, vl); |
| 17 | +} |
| 18 | + |
| 19 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f16mf2( |
| 20 | +// CHECK-RV64-NEXT: entry: |
| 21 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 2 x half> @llvm.riscv.vfncvt.rod.f.f.w.nxv2f16.nxv2f32.i64(<vscale x 2 x half> poison, <vscale x 2 x float> [[SRC:%.*]], i64 [[VL:%.*]]) |
| 22 | +// CHECK-RV64-NEXT: ret <vscale x 2 x half> [[TMP0]] |
| 23 | +// |
| 24 | +vfloat16mf2_t test_vfncvt_rod_f_f_w_f16mf2(vfloat32m1_t src, size_t vl) { |
| 25 | + return __riscv_vfncvt_rod_f_f_w_f16mf2(src, vl); |
| 26 | +} |
| 27 | + |
| 28 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f16m1( |
| 29 | +// CHECK-RV64-NEXT: entry: |
| 30 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 4 x half> @llvm.riscv.vfncvt.rod.f.f.w.nxv4f16.nxv4f32.i64(<vscale x 4 x half> poison, <vscale x 4 x float> [[SRC:%.*]], i64 [[VL:%.*]]) |
| 31 | +// CHECK-RV64-NEXT: ret <vscale x 4 x half> [[TMP0]] |
| 32 | +// |
| 33 | +vfloat16m1_t test_vfncvt_rod_f_f_w_f16m1(vfloat32m2_t src, size_t vl) { |
| 34 | + return __riscv_vfncvt_rod_f_f_w_f16m1(src, vl); |
| 35 | +} |
| 36 | + |
| 37 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f16m2( |
| 38 | +// CHECK-RV64-NEXT: entry: |
| 39 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x half> @llvm.riscv.vfncvt.rod.f.f.w.nxv8f16.nxv8f32.i64(<vscale x 8 x half> poison, <vscale x 8 x float> [[SRC:%.*]], i64 [[VL:%.*]]) |
| 40 | +// CHECK-RV64-NEXT: ret <vscale x 8 x half> [[TMP0]] |
| 41 | +// |
| 42 | +vfloat16m2_t test_vfncvt_rod_f_f_w_f16m2(vfloat32m4_t src, size_t vl) { |
| 43 | + return __riscv_vfncvt_rod_f_f_w_f16m2(src, vl); |
| 44 | +} |
| 45 | + |
| 46 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f16m4( |
| 47 | +// CHECK-RV64-NEXT: entry: |
| 48 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 16 x half> @llvm.riscv.vfncvt.rod.f.f.w.nxv16f16.nxv16f32.i64(<vscale x 16 x half> poison, <vscale x 16 x float> [[SRC:%.*]], i64 [[VL:%.*]]) |
| 49 | +// CHECK-RV64-NEXT: ret <vscale x 16 x half> [[TMP0]] |
| 50 | +// |
| 51 | +vfloat16m4_t test_vfncvt_rod_f_f_w_f16m4(vfloat32m8_t src, size_t vl) { |
| 52 | + return __riscv_vfncvt_rod_f_f_w_f16m4(src, vl); |
| 53 | +} |
| 54 | + |
| 55 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f32mf2( |
| 56 | +// CHECK-RV64-NEXT: entry: |
| 57 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 1 x float> @llvm.riscv.vfncvt.rod.f.f.w.nxv1f32.nxv1f64.i64(<vscale x 1 x float> poison, <vscale x 1 x double> [[SRC:%.*]], i64 [[VL:%.*]]) |
| 58 | +// CHECK-RV64-NEXT: ret <vscale x 1 x float> [[TMP0]] |
| 59 | +// |
| 60 | +vfloat32mf2_t test_vfncvt_rod_f_f_w_f32mf2(vfloat64m1_t src, size_t vl) { |
| 61 | + return __riscv_vfncvt_rod_f_f_w_f32mf2(src, vl); |
| 62 | +} |
| 63 | + |
| 64 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f32m1( |
| 65 | +// CHECK-RV64-NEXT: entry: |
| 66 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 2 x float> @llvm.riscv.vfncvt.rod.f.f.w.nxv2f32.nxv2f64.i64(<vscale x 2 x float> poison, <vscale x 2 x double> [[SRC:%.*]], i64 [[VL:%.*]]) |
| 67 | +// CHECK-RV64-NEXT: ret <vscale x 2 x float> [[TMP0]] |
| 68 | +// |
| 69 | +vfloat32m1_t test_vfncvt_rod_f_f_w_f32m1(vfloat64m2_t src, size_t vl) { |
| 70 | + return __riscv_vfncvt_rod_f_f_w_f32m1(src, vl); |
| 71 | +} |
| 72 | + |
| 73 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f32m2( |
| 74 | +// CHECK-RV64-NEXT: entry: |
| 75 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 4 x float> @llvm.riscv.vfncvt.rod.f.f.w.nxv4f32.nxv4f64.i64(<vscale x 4 x float> poison, <vscale x 4 x double> [[SRC:%.*]], i64 [[VL:%.*]]) |
| 76 | +// CHECK-RV64-NEXT: ret <vscale x 4 x float> [[TMP0]] |
| 77 | +// |
| 78 | +vfloat32m2_t test_vfncvt_rod_f_f_w_f32m2(vfloat64m4_t src, size_t vl) { |
| 79 | + return __riscv_vfncvt_rod_f_f_w_f32m2(src, vl); |
| 80 | +} |
| 81 | + |
| 82 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f32m4( |
| 83 | +// CHECK-RV64-NEXT: entry: |
| 84 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x float> @llvm.riscv.vfncvt.rod.f.f.w.nxv8f32.nxv8f64.i64(<vscale x 8 x float> poison, <vscale x 8 x double> [[SRC:%.*]], i64 [[VL:%.*]]) |
| 85 | +// CHECK-RV64-NEXT: ret <vscale x 8 x float> [[TMP0]] |
| 86 | +// |
| 87 | +vfloat32m4_t test_vfncvt_rod_f_f_w_f32m4(vfloat64m8_t src, size_t vl) { |
| 88 | + return __riscv_vfncvt_rod_f_f_w_f32m4(src, vl); |
| 89 | +} |
| 90 | + |
| 91 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f16mf4_m( |
| 92 | +// CHECK-RV64-NEXT: entry: |
| 93 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 1 x half> @llvm.riscv.vfncvt.rod.f.f.w.mask.nxv1f16.nxv1f32.i64(<vscale x 1 x half> poison, <vscale x 1 x float> [[SRC:%.*]], <vscale x 1 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3) |
| 94 | +// CHECK-RV64-NEXT: ret <vscale x 1 x half> [[TMP0]] |
| 95 | +// |
| 96 | +vfloat16mf4_t test_vfncvt_rod_f_f_w_f16mf4_m(vbool64_t mask, vfloat32mf2_t src, size_t vl) { |
| 97 | + return __riscv_vfncvt_rod_f_f_w_f16mf4_m(mask, src, vl); |
| 98 | +} |
| 99 | + |
| 100 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f16mf2_m( |
| 101 | +// CHECK-RV64-NEXT: entry: |
| 102 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 2 x half> @llvm.riscv.vfncvt.rod.f.f.w.mask.nxv2f16.nxv2f32.i64(<vscale x 2 x half> poison, <vscale x 2 x float> [[SRC:%.*]], <vscale x 2 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3) |
| 103 | +// CHECK-RV64-NEXT: ret <vscale x 2 x half> [[TMP0]] |
| 104 | +// |
| 105 | +vfloat16mf2_t test_vfncvt_rod_f_f_w_f16mf2_m(vbool32_t mask, vfloat32m1_t src, size_t vl) { |
| 106 | + return __riscv_vfncvt_rod_f_f_w_f16mf2_m(mask, src, vl); |
| 107 | +} |
| 108 | + |
| 109 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f16m1_m( |
| 110 | +// CHECK-RV64-NEXT: entry: |
| 111 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 4 x half> @llvm.riscv.vfncvt.rod.f.f.w.mask.nxv4f16.nxv4f32.i64(<vscale x 4 x half> poison, <vscale x 4 x float> [[SRC:%.*]], <vscale x 4 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3) |
| 112 | +// CHECK-RV64-NEXT: ret <vscale x 4 x half> [[TMP0]] |
| 113 | +// |
| 114 | +vfloat16m1_t test_vfncvt_rod_f_f_w_f16m1_m(vbool16_t mask, vfloat32m2_t src, size_t vl) { |
| 115 | + return __riscv_vfncvt_rod_f_f_w_f16m1_m(mask, src, vl); |
| 116 | +} |
| 117 | + |
| 118 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f16m2_m( |
| 119 | +// CHECK-RV64-NEXT: entry: |
| 120 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x half> @llvm.riscv.vfncvt.rod.f.f.w.mask.nxv8f16.nxv8f32.i64(<vscale x 8 x half> poison, <vscale x 8 x float> [[SRC:%.*]], <vscale x 8 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3) |
| 121 | +// CHECK-RV64-NEXT: ret <vscale x 8 x half> [[TMP0]] |
| 122 | +// |
| 123 | +vfloat16m2_t test_vfncvt_rod_f_f_w_f16m2_m(vbool8_t mask, vfloat32m4_t src, size_t vl) { |
| 124 | + return __riscv_vfncvt_rod_f_f_w_f16m2_m(mask, src, vl); |
| 125 | +} |
| 126 | + |
| 127 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f16m4_m( |
| 128 | +// CHECK-RV64-NEXT: entry: |
| 129 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 16 x half> @llvm.riscv.vfncvt.rod.f.f.w.mask.nxv16f16.nxv16f32.i64(<vscale x 16 x half> poison, <vscale x 16 x float> [[SRC:%.*]], <vscale x 16 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3) |
| 130 | +// CHECK-RV64-NEXT: ret <vscale x 16 x half> [[TMP0]] |
| 131 | +// |
| 132 | +vfloat16m4_t test_vfncvt_rod_f_f_w_f16m4_m(vbool4_t mask, vfloat32m8_t src, size_t vl) { |
| 133 | + return __riscv_vfncvt_rod_f_f_w_f16m4_m(mask, src, vl); |
| 134 | +} |
| 135 | + |
| 136 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f32mf2_m( |
| 137 | +// CHECK-RV64-NEXT: entry: |
| 138 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 1 x float> @llvm.riscv.vfncvt.rod.f.f.w.mask.nxv1f32.nxv1f64.i64(<vscale x 1 x float> poison, <vscale x 1 x double> [[SRC:%.*]], <vscale x 1 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3) |
| 139 | +// CHECK-RV64-NEXT: ret <vscale x 1 x float> [[TMP0]] |
| 140 | +// |
| 141 | +vfloat32mf2_t test_vfncvt_rod_f_f_w_f32mf2_m(vbool64_t mask, vfloat64m1_t src, size_t vl) { |
| 142 | + return __riscv_vfncvt_rod_f_f_w_f32mf2_m(mask, src, vl); |
| 143 | +} |
| 144 | + |
| 145 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f32m1_m( |
| 146 | +// CHECK-RV64-NEXT: entry: |
| 147 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 2 x float> @llvm.riscv.vfncvt.rod.f.f.w.mask.nxv2f32.nxv2f64.i64(<vscale x 2 x float> poison, <vscale x 2 x double> [[SRC:%.*]], <vscale x 2 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3) |
| 148 | +// CHECK-RV64-NEXT: ret <vscale x 2 x float> [[TMP0]] |
| 149 | +// |
| 150 | +vfloat32m1_t test_vfncvt_rod_f_f_w_f32m1_m(vbool32_t mask, vfloat64m2_t src, size_t vl) { |
| 151 | + return __riscv_vfncvt_rod_f_f_w_f32m1_m(mask, src, vl); |
| 152 | +} |
| 153 | + |
| 154 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f32m2_m( |
| 155 | +// CHECK-RV64-NEXT: entry: |
| 156 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 4 x float> @llvm.riscv.vfncvt.rod.f.f.w.mask.nxv4f32.nxv4f64.i64(<vscale x 4 x float> poison, <vscale x 4 x double> [[SRC:%.*]], <vscale x 4 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3) |
| 157 | +// CHECK-RV64-NEXT: ret <vscale x 4 x float> [[TMP0]] |
| 158 | +// |
| 159 | +vfloat32m2_t test_vfncvt_rod_f_f_w_f32m2_m(vbool16_t mask, vfloat64m4_t src, size_t vl) { |
| 160 | + return __riscv_vfncvt_rod_f_f_w_f32m2_m(mask, src, vl); |
| 161 | +} |
| 162 | + |
| 163 | +// CHECK-RV64-LABEL: @test_vfncvt_rod_f_f_w_f32m4_m( |
| 164 | +// CHECK-RV64-NEXT: entry: |
| 165 | +// CHECK-RV64-NEXT: [[TMP0:%.*]] = call <vscale x 8 x float> @llvm.riscv.vfncvt.rod.f.f.w.mask.nxv8f32.nxv8f64.i64(<vscale x 8 x float> poison, <vscale x 8 x double> [[SRC:%.*]], <vscale x 8 x i1> [[MASK:%.*]], i64 [[VL:%.*]], i64 3) |
| 166 | +// CHECK-RV64-NEXT: ret <vscale x 8 x float> [[TMP0]] |
| 167 | +// |
| 168 | +vfloat32m4_t test_vfncvt_rod_f_f_w_f32m4_m(vbool8_t mask, vfloat64m8_t src, size_t vl) { |
| 169 | + return __riscv_vfncvt_rod_f_f_w_f32m4_m(mask, src, vl); |
| 170 | +} |
| 171 | + |
0 commit comments