1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 4 2; RUN: opt -mtriple=riscv64-unknown-linux-gnu -mattr=+v -vector-library=sleefgnuabi -replace-with-veclib -S < %s | FileCheck %s 3 4;. 5; CHECK: @llvm.compiler.used = appending global [21 x ptr] [ptr @Sleef_cosdx_u10rvvm2, ptr @Sleef_cosfx_u10rvvm2, ptr @Sleef_expfx_u10rvvm2, ptr @Sleef_exp10dx_u10rvvm2, ptr @Sleef_exp10fx_u10rvvm2, ptr @Sleef_exp2dx_u10rvvm2, ptr @Sleef_exp2fx_u10rvvm2, ptr @Sleef_fmadx_rvvm2, ptr @Sleef_fmafx_rvvm2, ptr @Sleef_logdx_u10rvvm2, ptr @Sleef_logfx_u10rvvm2, ptr @Sleef_log10dx_u10rvvm2, ptr @Sleef_log10fx_u10rvvm2, ptr @Sleef_log2dx_u10rvvm2, ptr @Sleef_log2fx_u10rvvm2, ptr @Sleef_powdx_u10rvvm2, ptr @Sleef_powfx_u10rvvm2, ptr @Sleef_sindx_u10rvvm2, ptr @Sleef_sinfx_u10rvvm2, ptr @Sleef_sqrtdx_u05rvvm2, ptr @Sleef_sqrtfx_u05rvvm2], section "llvm.metadata" 6;. 7define <vscale x 2 x double> @llvm_ceil_vscale_f64(<vscale x 2 x double> %in) { 8; CHECK-LABEL: define <vscale x 2 x double> @llvm_ceil_vscale_f64( 9; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0:[0-9]+]] { 10; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.ceil.nxv2f64(<vscale x 2 x double> [[IN]]) 11; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 12; 13 %1 = call fast <vscale x 2 x double> @llvm.ceil.nxv2f64(<vscale x 2 x double> %in) 14 ret <vscale x 2 x double> %1 15} 16 17define <vscale x 4 x float> @llvm_ceil_vscale_f32(<vscale x 4 x float> %in) { 18; CHECK-LABEL: define <vscale x 4 x float> @llvm_ceil_vscale_f32( 19; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 20; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.ceil.nxv4f32(<vscale x 4 x float> [[IN]]) 21; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 22; 23 %1 = call fast <vscale x 4 x float> @llvm.ceil.nxv4f32(<vscale x 4 x float> %in) 24 ret <vscale x 4 x float> %1 25} 26 27define <vscale x 2 x double> @llvm_copysign_vscale_f64(<vscale x 2 x double> %mag, <vscale x 2 x double> %sgn) { 28; CHECK-LABEL: define <vscale x 2 x double> @llvm_copysign_vscale_f64( 29; CHECK-SAME: <vscale x 2 x double> [[MAG:%.*]], <vscale x 2 x double> [[SGN:%.*]]) #[[ATTR0]] { 30; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.copysign.nxv2f64(<vscale x 2 x double> [[MAG]], <vscale x 2 x double> [[SGN]]) 31; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 32; 33 %1 = call fast <vscale x 2 x double> @llvm.copysign.nxv2f64(<vscale x 2 x double> %mag, <vscale x 2 x double> %sgn) 34 ret <vscale x 2 x double> %1 35} 36 37define <vscale x 4 x float> @llvm_copysign_vscale_f32(<vscale x 4 x float> %mag, <vscale x 4 x float> %sgn) { 38; CHECK-LABEL: define <vscale x 4 x float> @llvm_copysign_vscale_f32( 39; CHECK-SAME: <vscale x 4 x float> [[MAG:%.*]], <vscale x 4 x float> [[SGN:%.*]]) #[[ATTR0]] { 40; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.copysign.nxv4f32(<vscale x 4 x float> [[MAG]], <vscale x 4 x float> [[SGN]]) 41; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 42; 43 %1 = call fast <vscale x 4 x float> @llvm.copysign.nxv4f32(<vscale x 4 x float> %mag, <vscale x 4 x float> %sgn) 44 ret <vscale x 4 x float> %1 45} 46 47define <vscale x 2 x double> @llvm_cos_vscale_f64(<vscale x 2 x double> %in) { 48; CHECK-LABEL: define <vscale x 2 x double> @llvm_cos_vscale_f64( 49; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 50; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @Sleef_cosdx_u10rvvm2(<vscale x 2 x double> [[IN]]) 51; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 52; 53 %1 = call fast <vscale x 2 x double> @llvm.cos.nxv2f64(<vscale x 2 x double> %in) 54 ret <vscale x 2 x double> %1 55} 56 57define <vscale x 4 x float> @llvm_cos_vscale_f32(<vscale x 4 x float> %in) { 58; CHECK-LABEL: define <vscale x 4 x float> @llvm_cos_vscale_f32( 59; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 60; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @Sleef_cosfx_u10rvvm2(<vscale x 4 x float> [[IN]]) 61; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 62; 63 %1 = call fast <vscale x 4 x float> @llvm.cos.nxv4f32(<vscale x 4 x float> %in) 64 ret <vscale x 4 x float> %1 65} 66 67define <vscale x 2 x double> @llvm_exp_vscale_f64(<vscale x 2 x double> %in) { 68; CHECK-LABEL: define <vscale x 2 x double> @llvm_exp_vscale_f64( 69; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 70; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.exp.nxv2f64(<vscale x 2 x double> [[IN]]) 71; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 72; 73 %1 = call fast <vscale x 2 x double> @llvm.exp.nxv2f64(<vscale x 2 x double> %in) 74 ret <vscale x 2 x double> %1 75} 76 77define <vscale x 4 x float> @llvm_exp_vscale_f32(<vscale x 4 x float> %in) { 78; CHECK-LABEL: define <vscale x 4 x float> @llvm_exp_vscale_f32( 79; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 80; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @Sleef_expfx_u10rvvm2(<vscale x 4 x float> [[IN]]) 81; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 82; 83 %1 = call fast <vscale x 4 x float> @llvm.exp.nxv4f32(<vscale x 4 x float> %in) 84 ret <vscale x 4 x float> %1 85} 86 87define <vscale x 2 x double> @llvm_exp10_vscale_f64(<vscale x 2 x double> %in) { 88; CHECK-LABEL: define <vscale x 2 x double> @llvm_exp10_vscale_f64( 89; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 90; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @Sleef_exp10dx_u10rvvm2(<vscale x 2 x double> [[IN]]) 91; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 92; 93 %1 = call fast <vscale x 2 x double> @llvm.exp10.nxv2f64(<vscale x 2 x double> %in) 94 ret <vscale x 2 x double> %1 95} 96 97define <vscale x 4 x float> @llvm_exp10_vscale_f32(<vscale x 4 x float> %in) { 98; CHECK-LABEL: define <vscale x 4 x float> @llvm_exp10_vscale_f32( 99; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 100; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @Sleef_exp10fx_u10rvvm2(<vscale x 4 x float> [[IN]]) 101; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 102; 103 %1 = call fast <vscale x 4 x float> @llvm.exp10.nxv4f32(<vscale x 4 x float> %in) 104 ret <vscale x 4 x float> %1 105} 106 107define <vscale x 2 x double> @llvm_exp2_vscale_f64(<vscale x 2 x double> %in) { 108; CHECK-LABEL: define <vscale x 2 x double> @llvm_exp2_vscale_f64( 109; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 110; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @Sleef_exp2dx_u10rvvm2(<vscale x 2 x double> [[IN]]) 111; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 112; 113 %1 = call fast <vscale x 2 x double> @llvm.exp2.nxv2f64(<vscale x 2 x double> %in) 114 ret <vscale x 2 x double> %1 115} 116 117define <vscale x 4 x float> @llvm_exp2_vscale_f32(<vscale x 4 x float> %in) { 118; CHECK-LABEL: define <vscale x 4 x float> @llvm_exp2_vscale_f32( 119; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 120; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @Sleef_exp2fx_u10rvvm2(<vscale x 4 x float> [[IN]]) 121; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 122; 123 %1 = call fast <vscale x 4 x float> @llvm.exp2.nxv4f32(<vscale x 4 x float> %in) 124 ret <vscale x 4 x float> %1 125} 126 127define <vscale x 2 x double> @llvm_fabs_vscale_f64(<vscale x 2 x double> %in) { 128; CHECK-LABEL: define <vscale x 2 x double> @llvm_fabs_vscale_f64( 129; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 130; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.fabs.nxv2f64(<vscale x 2 x double> [[IN]]) 131; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 132; 133 %1 = call fast <vscale x 2 x double> @llvm.fabs.nxv2f64(<vscale x 2 x double> %in) 134 ret <vscale x 2 x double> %1 135} 136 137define <vscale x 4 x float> @llvm_fabs_vscale_f32(<vscale x 4 x float> %in) { 138; CHECK-LABEL: define <vscale x 4 x float> @llvm_fabs_vscale_f32( 139; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 140; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.fabs.nxv4f32(<vscale x 4 x float> [[IN]]) 141; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 142; 143 %1 = call fast <vscale x 4 x float> @llvm.fabs.nxv4f32(<vscale x 4 x float> %in) 144 ret <vscale x 4 x float> %1 145} 146 147define <vscale x 2 x double> @llvm_floor_vscale_f64(<vscale x 2 x double> %in) { 148; CHECK-LABEL: define <vscale x 2 x double> @llvm_floor_vscale_f64( 149; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 150; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.floor.nxv2f64(<vscale x 2 x double> [[IN]]) 151; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 152; 153 %1 = call fast <vscale x 2 x double> @llvm.floor.nxv2f64(<vscale x 2 x double> %in) 154 ret <vscale x 2 x double> %1 155} 156 157define <vscale x 4 x float> @llvm_floor_vscale_f32(<vscale x 4 x float> %in) { 158; CHECK-LABEL: define <vscale x 4 x float> @llvm_floor_vscale_f32( 159; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 160; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.floor.nxv4f32(<vscale x 4 x float> [[IN]]) 161; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 162; 163 %1 = call fast <vscale x 4 x float> @llvm.floor.nxv4f32(<vscale x 4 x float> %in) 164 ret <vscale x 4 x float> %1 165} 166 167define <vscale x 2 x double> @llvm_fma_vscale_f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %c ) { 168; CHECK-LABEL: define <vscale x 2 x double> @llvm_fma_vscale_f64( 169; CHECK-SAME: <vscale x 2 x double> [[A:%.*]], <vscale x 2 x double> [[B:%.*]], <vscale x 2 x double> [[C:%.*]]) #[[ATTR0]] { 170; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @Sleef_fmadx_rvvm2(<vscale x 2 x double> [[A]], <vscale x 2 x double> [[B]], <vscale x 2 x double> [[C]]) 171; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 172; 173 %1 = call fast <vscale x 2 x double> @llvm.fma.nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %c) 174 ret <vscale x 2 x double> %1 175} 176 177define <vscale x 4 x float> @llvm_fma_vscale_f32(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c) { 178; CHECK-LABEL: define <vscale x 4 x float> @llvm_fma_vscale_f32( 179; CHECK-SAME: <vscale x 4 x float> [[A:%.*]], <vscale x 4 x float> [[B:%.*]], <vscale x 4 x float> [[C:%.*]]) #[[ATTR0]] { 180; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @Sleef_fmafx_rvvm2(<vscale x 4 x float> [[A]], <vscale x 4 x float> [[B]], <vscale x 4 x float> [[C]]) 181; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 182; 183 %1 = call fast <vscale x 4 x float> @llvm.fma.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c) 184 ret <vscale x 4 x float> %1 185} 186 187define <vscale x 2 x double> @llvm_log_vscale_f64(<vscale x 2 x double> %in) { 188; CHECK-LABEL: define <vscale x 2 x double> @llvm_log_vscale_f64( 189; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 190; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @Sleef_logdx_u10rvvm2(<vscale x 2 x double> [[IN]]) 191; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 192; 193 %1 = call fast <vscale x 2 x double> @llvm.log.nxv2f64(<vscale x 2 x double> %in) 194 ret <vscale x 2 x double> %1 195} 196 197define <vscale x 4 x float> @llvm_log_vscale_f32(<vscale x 4 x float> %in) { 198; CHECK-LABEL: define <vscale x 4 x float> @llvm_log_vscale_f32( 199; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 200; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @Sleef_logfx_u10rvvm2(<vscale x 4 x float> [[IN]]) 201; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 202; 203 %1 = call fast <vscale x 4 x float> @llvm.log.nxv4f32(<vscale x 4 x float> %in) 204 ret <vscale x 4 x float> %1 205} 206 207define <vscale x 2 x double> @llvm_log10_vscale_f64(<vscale x 2 x double> %in) { 208; CHECK-LABEL: define <vscale x 2 x double> @llvm_log10_vscale_f64( 209; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 210; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @Sleef_log10dx_u10rvvm2(<vscale x 2 x double> [[IN]]) 211; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 212; 213 %1 = call fast <vscale x 2 x double> @llvm.log10.nxv2f64(<vscale x 2 x double> %in) 214 ret <vscale x 2 x double> %1 215} 216 217define <vscale x 4 x float> @llvm_log10_vscale_f32(<vscale x 4 x float> %in) { 218; CHECK-LABEL: define <vscale x 4 x float> @llvm_log10_vscale_f32( 219; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 220; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @Sleef_log10fx_u10rvvm2(<vscale x 4 x float> [[IN]]) 221; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 222; 223 %1 = call fast <vscale x 4 x float> @llvm.log10.nxv4f32(<vscale x 4 x float> %in) 224 ret <vscale x 4 x float> %1 225} 226 227define <vscale x 2 x double> @llvm_log2_vscale_f64(<vscale x 2 x double> %in) { 228; CHECK-LABEL: define <vscale x 2 x double> @llvm_log2_vscale_f64( 229; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 230; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @Sleef_log2dx_u10rvvm2(<vscale x 2 x double> [[IN]]) 231; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 232; 233 %1 = call fast <vscale x 2 x double> @llvm.log2.nxv2f64(<vscale x 2 x double> %in) 234 ret <vscale x 2 x double> %1 235} 236 237define <vscale x 4 x float> @llvm_log2_vscale_f32(<vscale x 4 x float> %in) { 238; CHECK-LABEL: define <vscale x 4 x float> @llvm_log2_vscale_f32( 239; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 240; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @Sleef_log2fx_u10rvvm2(<vscale x 4 x float> [[IN]]) 241; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 242; 243 %1 = call fast <vscale x 4 x float> @llvm.log2.nxv4f32(<vscale x 4 x float> %in) 244 ret <vscale x 4 x float> %1 245} 246 247define <vscale x 2 x double> @llvm_maxnum_vscale_f64(<vscale x 2 x double> %in0, <vscale x 2 x double> %in1) { 248; CHECK-LABEL: define <vscale x 2 x double> @llvm_maxnum_vscale_f64( 249; CHECK-SAME: <vscale x 2 x double> [[IN0:%.*]], <vscale x 2 x double> [[IN1:%.*]]) #[[ATTR0]] { 250; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.maxnum.nxv2f64(<vscale x 2 x double> [[IN0]], <vscale x 2 x double> [[IN1]]) 251; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 252; 253 %1 = call fast <vscale x 2 x double> @llvm.maxnum.nxv2f64(<vscale x 2 x double> %in0, <vscale x 2 x double> %in1) 254 ret <vscale x 2 x double> %1 255} 256 257define <vscale x 4 x float> @llvm_maxnum_vscale_f32(<vscale x 4 x float> %in0, <vscale x 4 x float> %in1) { 258; CHECK-LABEL: define <vscale x 4 x float> @llvm_maxnum_vscale_f32( 259; CHECK-SAME: <vscale x 4 x float> [[IN0:%.*]], <vscale x 4 x float> [[IN1:%.*]]) #[[ATTR0]] { 260; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.maxnum.nxv4f32(<vscale x 4 x float> [[IN0]], <vscale x 4 x float> [[IN1]]) 261; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 262; 263 %1 = call fast <vscale x 4 x float> @llvm.maxnum.nxv4f32(<vscale x 4 x float> %in0, <vscale x 4 x float> %in1) 264 ret <vscale x 4 x float> %1 265} 266 267define <vscale x 2 x double> @llvm_minnum_vscale_f64(<vscale x 2 x double> %in0, <vscale x 2 x double> %in1) { 268; CHECK-LABEL: define <vscale x 2 x double> @llvm_minnum_vscale_f64( 269; CHECK-SAME: <vscale x 2 x double> [[IN0:%.*]], <vscale x 2 x double> [[IN1:%.*]]) #[[ATTR0]] { 270; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.minnum.nxv2f64(<vscale x 2 x double> [[IN0]], <vscale x 2 x double> [[IN1]]) 271; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 272; 273 %1 = call fast <vscale x 2 x double> @llvm.minnum.nxv2f64(<vscale x 2 x double> %in0, <vscale x 2 x double> %in1) 274 ret <vscale x 2 x double> %1 275} 276 277define <vscale x 4 x float> @llvm_minnum_vscale_f32(<vscale x 4 x float> %in0, <vscale x 4 x float> %in1) { 278; CHECK-LABEL: define <vscale x 4 x float> @llvm_minnum_vscale_f32( 279; CHECK-SAME: <vscale x 4 x float> [[IN0:%.*]], <vscale x 4 x float> [[IN1:%.*]]) #[[ATTR0]] { 280; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.minnum.nxv4f32(<vscale x 4 x float> [[IN0]], <vscale x 4 x float> [[IN1]]) 281; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 282; 283 %1 = call fast <vscale x 4 x float> @llvm.minnum.nxv4f32(<vscale x 4 x float> %in0, <vscale x 4 x float> %in1) 284 ret <vscale x 4 x float> %1 285} 286 287define <vscale x 2 x double> @llvm_nearbyint_vscale_f64(<vscale x 2 x double> %in) { 288; CHECK-LABEL: define <vscale x 2 x double> @llvm_nearbyint_vscale_f64( 289; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 290; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.nearbyint.nxv2f64(<vscale x 2 x double> [[IN]]) 291; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 292; 293 %1 = call fast <vscale x 2 x double> @llvm.nearbyint.nxv2f64(<vscale x 2 x double> %in) 294 ret <vscale x 2 x double> %1 295} 296 297define <vscale x 4 x float> @llvm_nearbyint_vscale_f32(<vscale x 4 x float> %in) { 298; CHECK-LABEL: define <vscale x 4 x float> @llvm_nearbyint_vscale_f32( 299; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 300; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.nearbyint.nxv4f32(<vscale x 4 x float> [[IN]]) 301; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 302; 303 %1 = call fast <vscale x 4 x float> @llvm.nearbyint.nxv4f32(<vscale x 4 x float> %in) 304 ret <vscale x 4 x float> %1 305} 306 307define <vscale x 2 x double> @llvm_pow_vscale_f64(<vscale x 2 x double> %in, <vscale x 2 x double> %pow) { 308; CHECK-LABEL: define <vscale x 2 x double> @llvm_pow_vscale_f64( 309; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]], <vscale x 2 x double> [[POW:%.*]]) #[[ATTR0]] { 310; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @Sleef_powdx_u10rvvm2(<vscale x 2 x double> [[IN]], <vscale x 2 x double> [[POW]]) 311; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 312; 313 %1 = call fast <vscale x 2 x double> @llvm.pow.nxv2f64(<vscale x 2 x double> %in, <vscale x 2 x double> %pow) 314 ret <vscale x 2 x double> %1 315} 316 317define <vscale x 4 x float> @llvm_pow_vscale_f32(<vscale x 4 x float> %in, <vscale x 4 x float> %pow) { 318; CHECK-LABEL: define <vscale x 4 x float> @llvm_pow_vscale_f32( 319; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]], <vscale x 4 x float> [[POW:%.*]]) #[[ATTR0]] { 320; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @Sleef_powfx_u10rvvm2(<vscale x 4 x float> [[IN]], <vscale x 4 x float> [[POW]]) 321; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 322; 323 %1 = call fast <vscale x 4 x float> @llvm.pow.nxv4f32(<vscale x 4 x float> %in, <vscale x 4 x float> %pow) 324 ret <vscale x 4 x float> %1 325} 326 327define <vscale x 2 x double> @llvm_rint_vscale_f64(<vscale x 2 x double> %in) { 328; CHECK-LABEL: define <vscale x 2 x double> @llvm_rint_vscale_f64( 329; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 330; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.rint.nxv2f64(<vscale x 2 x double> [[IN]]) 331; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 332; 333 %1 = call fast <vscale x 2 x double> @llvm.rint.nxv2f64(<vscale x 2 x double> %in) 334 ret <vscale x 2 x double> %1 335} 336 337define <vscale x 4 x float> @llvm_rint_vscale_f32(<vscale x 4 x float> %in) { 338; CHECK-LABEL: define <vscale x 4 x float> @llvm_rint_vscale_f32( 339; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 340; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.rint.nxv4f32(<vscale x 4 x float> [[IN]]) 341; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 342; 343 %1 = call fast <vscale x 4 x float> @llvm.rint.nxv4f32(<vscale x 4 x float> %in) 344 ret <vscale x 4 x float> %1 345} 346 347define <vscale x 2 x double> @llvm_round_vscale_f64(<vscale x 2 x double> %in) { 348; CHECK-LABEL: define <vscale x 2 x double> @llvm_round_vscale_f64( 349; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 350; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.round.nxv2f64(<vscale x 2 x double> [[IN]]) 351; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 352; 353 %1 = call fast <vscale x 2 x double> @llvm.round.nxv2f64(<vscale x 2 x double> %in) 354 ret <vscale x 2 x double> %1 355} 356 357define <vscale x 4 x float> @llvm_round_vscale_f32(<vscale x 4 x float> %in) { 358; CHECK-LABEL: define <vscale x 4 x float> @llvm_round_vscale_f32( 359; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 360; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.round.nxv4f32(<vscale x 4 x float> [[IN]]) 361; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 362; 363 %1 = call fast <vscale x 4 x float> @llvm.round.nxv4f32(<vscale x 4 x float> %in) 364 ret <vscale x 4 x float> %1 365} 366 367define <vscale x 2 x double> @llvm_sin_vscale_f64(<vscale x 2 x double> %in) { 368; CHECK-LABEL: define <vscale x 2 x double> @llvm_sin_vscale_f64( 369; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 370; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @Sleef_sindx_u10rvvm2(<vscale x 2 x double> [[IN]]) 371; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 372; 373 %1 = call fast <vscale x 2 x double> @llvm.sin.nxv2f64(<vscale x 2 x double> %in) 374 ret <vscale x 2 x double> %1 375} 376 377define <vscale x 4 x float> @llvm_sin_vscale_f32(<vscale x 4 x float> %in) { 378; CHECK-LABEL: define <vscale x 4 x float> @llvm_sin_vscale_f32( 379; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 380; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @Sleef_sinfx_u10rvvm2(<vscale x 4 x float> [[IN]]) 381; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 382; 383 %1 = call fast <vscale x 4 x float> @llvm.sin.nxv4f32(<vscale x 4 x float> %in) 384 ret <vscale x 4 x float> %1 385} 386 387define <vscale x 2 x double> @llvm_sqrt_vscale_f64(<vscale x 2 x double> %in) { 388; CHECK-LABEL: define <vscale x 2 x double> @llvm_sqrt_vscale_f64( 389; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 390; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @Sleef_sqrtdx_u05rvvm2(<vscale x 2 x double> [[IN]]) 391; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 392; 393 %1 = call fast <vscale x 2 x double> @llvm.sqrt.nxv2f64(<vscale x 2 x double> %in) 394 ret <vscale x 2 x double> %1 395} 396 397define <vscale x 4 x float> @llvm_sqrt_vscale_f32(<vscale x 4 x float> %in) { 398; CHECK-LABEL: define <vscale x 4 x float> @llvm_sqrt_vscale_f32( 399; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 400; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @Sleef_sqrtfx_u05rvvm2(<vscale x 4 x float> [[IN]]) 401; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 402; 403 %1 = call fast <vscale x 4 x float> @llvm.sqrt.nxv4f32(<vscale x 4 x float> %in) 404 ret <vscale x 4 x float> %1 405} 406 407define <vscale x 2 x double> @llvm_trunc_vscale_f64(<vscale x 2 x double> %in) { 408; CHECK-LABEL: define <vscale x 2 x double> @llvm_trunc_vscale_f64( 409; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 410; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.trunc.nxv2f64(<vscale x 2 x double> [[IN]]) 411; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 412; 413 %1 = call fast <vscale x 2 x double> @llvm.trunc.nxv2f64(<vscale x 2 x double> %in) 414 ret <vscale x 2 x double> %1 415} 416 417define <vscale x 4 x float> @llvm_trunc_vscale_f32(<vscale x 4 x float> %in) { 418; CHECK-LABEL: define <vscale x 4 x float> @llvm_trunc_vscale_f32( 419; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 420; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.trunc.nxv4f32(<vscale x 4 x float> [[IN]]) 421; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 422; 423 %1 = call fast <vscale x 4 x float> @llvm.trunc.nxv4f32(<vscale x 4 x float> %in) 424 ret <vscale x 4 x float> %1 425} 426 427define <vscale x 2 x double> @frem_f64(<vscale x 2 x double> %in) { 428; CHECK-LABEL: define <vscale x 2 x double> @frem_f64( 429; CHECK-SAME: <vscale x 2 x double> [[IN:%.*]]) #[[ATTR0]] { 430; CHECK-NEXT: [[TMP1:%.*]] = frem <vscale x 2 x double> [[IN]], [[IN]] 431; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]] 432; 433 %1= frem <vscale x 2 x double> %in, %in 434 ret <vscale x 2 x double> %1 435} 436 437define <vscale x 4 x float> @frem_f32(<vscale x 4 x float> %in) { 438; CHECK-LABEL: define <vscale x 4 x float> @frem_f32( 439; CHECK-SAME: <vscale x 4 x float> [[IN:%.*]]) #[[ATTR0]] { 440; CHECK-NEXT: [[TMP1:%.*]] = frem <vscale x 4 x float> [[IN]], [[IN]] 441; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]] 442; 443 %1= frem <vscale x 4 x float> %in, %in 444 ret <vscale x 4 x float> %1 445} 446 447declare <vscale x 2 x double> @llvm.ceil.nxv2f64(<vscale x 2 x double>) 448declare <vscale x 4 x float> @llvm.ceil.nxv4f32(<vscale x 4 x float>) 449declare <vscale x 2 x double> @llvm.copysign.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>) 450declare <vscale x 4 x float> @llvm.copysign.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>) 451declare <vscale x 2 x double> @llvm.cos.nxv2f64(<vscale x 2 x double>) 452declare <vscale x 4 x float> @llvm.cos.nxv4f32(<vscale x 4 x float>) 453declare <vscale x 2 x double> @llvm.exp.nxv2f64(<vscale x 2 x double>) 454declare <vscale x 4 x float> @llvm.exp.nxv4f32(<vscale x 4 x float>) 455declare <vscale x 2 x double> @llvm.exp2.nxv2f64(<vscale x 2 x double>) 456declare <vscale x 4 x float> @llvm.exp2.nxv4f32(<vscale x 4 x float>) 457declare <vscale x 2 x double> @llvm.exp10.nxv2f64(<vscale x 2 x double>) 458declare <vscale x 4 x float> @llvm.exp10.nxv4f32(<vscale x 4 x float>) 459declare <vscale x 2 x double> @llvm.fabs.nxv2f64(<vscale x 2 x double>) 460declare <vscale x 4 x float> @llvm.fabs.nxv4f32(<vscale x 4 x float>) 461declare <vscale x 2 x double> @llvm.floor.nxv2f64(<vscale x 2 x double>) 462declare <vscale x 4 x float> @llvm.floor.nxv4f32(<vscale x 4 x float>) 463declare <vscale x 2 x double> @llvm.fma.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>) 464declare <vscale x 4 x float> @llvm.fma.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>) 465declare <vscale x 2 x double> @llvm.log.nxv2f64(<vscale x 2 x double>) 466declare <vscale x 4 x float> @llvm.log.nxv4f32(<vscale x 4 x float>) 467declare <vscale x 2 x double> @llvm.log10.nxv2f64(<vscale x 2 x double>) 468declare <vscale x 4 x float> @llvm.log10.nxv4f32(<vscale x 4 x float>) 469declare <vscale x 2 x double> @llvm.log2.nxv2f64(<vscale x 2 x double>) 470declare <vscale x 4 x float> @llvm.log2.nxv4f32(<vscale x 4 x float>) 471declare <vscale x 2 x double> @llvm.maxnum.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>) 472declare <vscale x 4 x float> @llvm.maxnum.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>) 473declare <vscale x 2 x double> @llvm.minnum.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>) 474declare <vscale x 4 x float> @llvm.minnum.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>) 475declare <vscale x 2 x double> @llvm.nearbyint.nxv2f64(<vscale x 2 x double>) 476declare <vscale x 4 x float> @llvm.nearbyint.nxv4f32(<vscale x 4 x float>) 477declare <vscale x 2 x double> @llvm.pow.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>) 478declare <vscale x 4 x float> @llvm.pow.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>) 479declare <vscale x 2 x double> @llvm.rint.nxv2f64(<vscale x 2 x double>) 480declare <vscale x 4 x float> @llvm.rint.nxv4f32(<vscale x 4 x float>) 481declare <vscale x 2 x double> @llvm.round.nxv2f64(<vscale x 2 x double>) 482declare <vscale x 4 x float> @llvm.round.nxv4f32(<vscale x 4 x float>) 483declare <vscale x 2 x double> @llvm.sin.nxv2f64(<vscale x 2 x double>) 484declare <vscale x 4 x float> @llvm.sin.nxv4f32(<vscale x 4 x float>) 485declare <vscale x 2 x double> @llvm.sqrt.nxv2f64(<vscale x 2 x double>) 486declare <vscale x 4 x float> @llvm.sqrt.nxv4f32(<vscale x 4 x float>) 487declare <vscale x 2 x double> @llvm.trunc.nxv2f64(<vscale x 2 x double>) 488declare <vscale x 4 x float> @llvm.trunc.nxv4f32(<vscale x 4 x float>) 489;. 490; CHECK: attributes #[[ATTR0]] = { "target-features"="+v" } 491; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) "target-features"="+v" } 492;. 493