580 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals2; RUN: opt -mattr=+sve -vector-library=LIBMVEC -replace-with-veclib -S < %s | FileCheck %s3 4target triple = "aarch64-unknown-linux-gnu"5 6;.7; CHECK: @llvm.compiler.used = appending global [34 x ptr] [ptr @_ZGVsMxv_cos, ptr @_ZGVsMxv_cosf, ptr @_ZGVsMxv_exp, ptr @_ZGVsMxv_expf, ptr @_ZGVsMxv_exp10, ptr @_ZGVsMxv_exp10f, ptr @_ZGVsMxv_exp2, ptr @_ZGVsMxv_exp2f, ptr @_ZGVsMxv_log, ptr @_ZGVsMxv_logf, ptr @_ZGVsMxv_log10, ptr @_ZGVsMxv_log10f, ptr @_ZGVsMxv_log2, ptr @_ZGVsMxv_log2f, ptr @_ZGVsMxvv_pow, ptr @_ZGVsMxvv_powf, ptr @_ZGVsMxv_sin, ptr @_ZGVsMxv_sinf, ptr @_ZGVsMxv_tan, ptr @_ZGVsMxv_tanf, ptr @_ZGVsMxv_acos, ptr @_ZGVsMxv_acosf, ptr @_ZGVsMxv_asin, ptr @_ZGVsMxv_asinf, ptr @_ZGVsMxv_atan, ptr @_ZGVsMxv_atanf, ptr @_ZGVsMxvv_atan2, ptr @_ZGVsMxvv_atan2f, ptr @_ZGVsMxv_cosh, ptr @_ZGVsMxv_coshf, ptr @_ZGVsMxv_sinh, ptr @_ZGVsMxv_sinhf, ptr @_ZGVsMxv_tanh, ptr @_ZGVsMxv_tanhf], section "llvm.metadata"8;.9define <vscale x 2 x double> @llvm_ceil_vscale_f64(<vscale x 2 x double> %in) {10; CHECK-LABEL: @llvm_ceil_vscale_f64(11; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.ceil.nxv2f64(<vscale x 2 x double> [[IN:%.*]])12; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]13;14 %1 = call fast <vscale x 2 x double> @llvm.ceil.nxv2f64(<vscale x 2 x double> %in)15 ret <vscale x 2 x double> %116}17 18define <vscale x 4 x float> @llvm_ceil_vscale_f32(<vscale x 4 x float> %in) {19; CHECK-LABEL: @llvm_ceil_vscale_f32(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> %125}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: @llvm_copysign_vscale_f64(29; 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:%.*]])30; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]31;32 %1 = call fast <vscale x 2 x double> @llvm.copysign.nxv2f64(<vscale x 2 x double> %mag, <vscale x 2 x double> %sgn)33 ret <vscale x 2 x double> %134}35 36define <vscale x 4 x float> @llvm_copysign_vscale_f32(<vscale x 4 x float> %mag, <vscale x 4 x float> %sgn) {37; CHECK-LABEL: @llvm_copysign_vscale_f32(38; 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:%.*]])39; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]40;41 %1 = call fast <vscale x 4 x float> @llvm.copysign.nxv4f32(<vscale x 4 x float> %mag, <vscale x 4 x float> %sgn)42 ret <vscale x 4 x float> %143}44 45define <vscale x 2 x double> @llvm_cos_vscale_f64(<vscale x 2 x double> %in) {46; CHECK-LABEL: @llvm_cos_vscale_f64(47; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_cos(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))48; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]49;50 %1 = call fast <vscale x 2 x double> @llvm.cos.nxv2f64(<vscale x 2 x double> %in)51 ret <vscale x 2 x double> %152}53 54define <vscale x 4 x float> @llvm_cos_vscale_f32(<vscale x 4 x float> %in) {55; CHECK-LABEL: @llvm_cos_vscale_f32(56; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_cosf(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))57; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]58;59 %1 = call fast <vscale x 4 x float> @llvm.cos.nxv4f32(<vscale x 4 x float> %in)60 ret <vscale x 4 x float> %161}62 63define <vscale x 2 x double> @llvm_exp_vscale_f64(<vscale x 2 x double> %in) {64; CHECK-LABEL: @llvm_exp_vscale_f64(65; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_exp(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))66; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]67;68 %1 = call fast <vscale x 2 x double> @llvm.exp.nxv2f64(<vscale x 2 x double> %in)69 ret <vscale x 2 x double> %170}71 72define <vscale x 4 x float> @llvm_exp_vscale_f32(<vscale x 4 x float> %in) {73; CHECK-LABEL: @llvm_exp_vscale_f32(74; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_expf(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))75; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]76;77 %1 = call fast <vscale x 4 x float> @llvm.exp.nxv4f32(<vscale x 4 x float> %in)78 ret <vscale x 4 x float> %179}80 81define <vscale x 2 x double> @llvm_exp10_vscale_f64(<vscale x 2 x double> %in) {82; CHECK-LABEL: @llvm_exp10_vscale_f64(83; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_exp10(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))84; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]85;86 %1 = call fast <vscale x 2 x double> @llvm.exp10.nxv2f64(<vscale x 2 x double> %in)87 ret <vscale x 2 x double> %188}89 90define <vscale x 4 x float> @llvm_exp10_vscale_f32(<vscale x 4 x float> %in) {91; CHECK-LABEL: @llvm_exp10_vscale_f32(92; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_exp10f(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))93; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]94;95 %1 = call fast <vscale x 4 x float> @llvm.exp10.nxv4f32(<vscale x 4 x float> %in)96 ret <vscale x 4 x float> %197}98 99define <vscale x 2 x double> @llvm_exp2_vscale_f64(<vscale x 2 x double> %in) {100; CHECK-LABEL: @llvm_exp2_vscale_f64(101; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_exp2(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))102; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]103;104 %1 = call fast <vscale x 2 x double> @llvm.exp2.nxv2f64(<vscale x 2 x double> %in)105 ret <vscale x 2 x double> %1106}107 108define <vscale x 4 x float> @llvm_exp2_vscale_f32(<vscale x 4 x float> %in) {109; CHECK-LABEL: @llvm_exp2_vscale_f32(110; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_exp2f(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))111; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]112;113 %1 = call fast <vscale x 4 x float> @llvm.exp2.nxv4f32(<vscale x 4 x float> %in)114 ret <vscale x 4 x float> %1115}116 117define <vscale x 2 x double> @llvm_fabs_vscale_f64(<vscale x 2 x double> %in) {118; CHECK-LABEL: @llvm_fabs_vscale_f64(119; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.fabs.nxv2f64(<vscale x 2 x double> [[IN:%.*]])120; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]121;122 %1 = call fast <vscale x 2 x double> @llvm.fabs.nxv2f64(<vscale x 2 x double> %in)123 ret <vscale x 2 x double> %1124}125 126define <vscale x 4 x float> @llvm_fabs_vscale_f32(<vscale x 4 x float> %in) {127; CHECK-LABEL: @llvm_fabs_vscale_f32(128; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.fabs.nxv4f32(<vscale x 4 x float> [[IN:%.*]])129; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]130;131 %1 = call fast <vscale x 4 x float> @llvm.fabs.nxv4f32(<vscale x 4 x float> %in)132 ret <vscale x 4 x float> %1133}134 135define <vscale x 2 x double> @llvm_floor_vscale_f64(<vscale x 2 x double> %in) {136; CHECK-LABEL: @llvm_floor_vscale_f64(137; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.floor.nxv2f64(<vscale x 2 x double> [[IN:%.*]])138; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]139;140 %1 = call fast <vscale x 2 x double> @llvm.floor.nxv2f64(<vscale x 2 x double> %in)141 ret <vscale x 2 x double> %1142}143 144define <vscale x 4 x float> @llvm_floor_vscale_f32(<vscale x 4 x float> %in) {145; CHECK-LABEL: @llvm_floor_vscale_f32(146; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.floor.nxv4f32(<vscale x 4 x float> [[IN:%.*]])147; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]148;149 %1 = call fast <vscale x 4 x float> @llvm.floor.nxv4f32(<vscale x 4 x float> %in)150 ret <vscale x 4 x float> %1151}152 153define <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 ) {154; CHECK-LABEL: @llvm_fma_vscale_f64(155; CHECK-NEXT: [[TMP1:%.*]] = 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:%.*]])156; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]157;158 %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)159 ret <vscale x 2 x double> %1160}161 162define <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) {163; CHECK-LABEL: @llvm_fma_vscale_f32(164; CHECK-NEXT: [[TMP1:%.*]] = 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:%.*]])165; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]166;167 %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)168 ret <vscale x 4 x float> %1169}170 171define <vscale x 2 x double> @llvm_log_vscale_f64(<vscale x 2 x double> %in) {172; CHECK-LABEL: @llvm_log_vscale_f64(173; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_log(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))174; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]175;176 %1 = call fast <vscale x 2 x double> @llvm.log.nxv2f64(<vscale x 2 x double> %in)177 ret <vscale x 2 x double> %1178}179 180define <vscale x 4 x float> @llvm_log_vscale_f32(<vscale x 4 x float> %in) {181; CHECK-LABEL: @llvm_log_vscale_f32(182; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_logf(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))183; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]184;185 %1 = call fast <vscale x 4 x float> @llvm.log.nxv4f32(<vscale x 4 x float> %in)186 ret <vscale x 4 x float> %1187}188 189define <vscale x 2 x double> @llvm_log10_vscale_f64(<vscale x 2 x double> %in) {190; CHECK-LABEL: @llvm_log10_vscale_f64(191; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_log10(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))192; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]193;194 %1 = call fast <vscale x 2 x double> @llvm.log10.nxv2f64(<vscale x 2 x double> %in)195 ret <vscale x 2 x double> %1196}197 198define <vscale x 4 x float> @llvm_log10_vscale_f32(<vscale x 4 x float> %in) {199; CHECK-LABEL: @llvm_log10_vscale_f32(200; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_log10f(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))201; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]202;203 %1 = call fast <vscale x 4 x float> @llvm.log10.nxv4f32(<vscale x 4 x float> %in)204 ret <vscale x 4 x float> %1205}206 207define <vscale x 2 x double> @llvm_log2_vscale_f64(<vscale x 2 x double> %in) {208; CHECK-LABEL: @llvm_log2_vscale_f64(209; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_log2(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))210; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]211;212 %1 = call fast <vscale x 2 x double> @llvm.log2.nxv2f64(<vscale x 2 x double> %in)213 ret <vscale x 2 x double> %1214}215 216define <vscale x 4 x float> @llvm_log2_vscale_f32(<vscale x 4 x float> %in) {217; CHECK-LABEL: @llvm_log2_vscale_f32(218; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_log2f(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))219; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]220;221 %1 = call fast <vscale x 4 x float> @llvm.log2.nxv4f32(<vscale x 4 x float> %in)222 ret <vscale x 4 x float> %1223}224 225define <vscale x 2 x double> @llvm_maxnum_vscale_f64(<vscale x 2 x double> %in0, <vscale x 2 x double> %in1) {226; CHECK-LABEL: @llvm_maxnum_vscale_f64(227; 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:%.*]])228; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]229;230 %1 = call fast <vscale x 2 x double> @llvm.maxnum.nxv2f64(<vscale x 2 x double> %in0, <vscale x 2 x double> %in1)231 ret <vscale x 2 x double> %1232}233 234define <vscale x 4 x float> @llvm_maxnum_vscale_f32(<vscale x 4 x float> %in0, <vscale x 4 x float> %in1) {235; CHECK-LABEL: @llvm_maxnum_vscale_f32(236; 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:%.*]])237; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]238;239 %1 = call fast <vscale x 4 x float> @llvm.maxnum.nxv4f32(<vscale x 4 x float> %in0, <vscale x 4 x float> %in1)240 ret <vscale x 4 x float> %1241}242 243define <vscale x 2 x double> @llvm_minnum_vscale_f64(<vscale x 2 x double> %in0, <vscale x 2 x double> %in1) {244; CHECK-LABEL: @llvm_minnum_vscale_f64(245; 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:%.*]])246; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]247;248 %1 = call fast <vscale x 2 x double> @llvm.minnum.nxv2f64(<vscale x 2 x double> %in0, <vscale x 2 x double> %in1)249 ret <vscale x 2 x double> %1250}251 252define <vscale x 4 x float> @llvm_minnum_vscale_f32(<vscale x 4 x float> %in0, <vscale x 4 x float> %in1) {253; CHECK-LABEL: @llvm_minnum_vscale_f32(254; 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:%.*]])255; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]256;257 %1 = call fast <vscale x 4 x float> @llvm.minnum.nxv4f32(<vscale x 4 x float> %in0, <vscale x 4 x float> %in1)258 ret <vscale x 4 x float> %1259}260 261define <vscale x 2 x double> @llvm_nearbyint_vscale_f64(<vscale x 2 x double> %in) {262; CHECK-LABEL: @llvm_nearbyint_vscale_f64(263; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.nearbyint.nxv2f64(<vscale x 2 x double> [[IN:%.*]])264; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]265;266 %1 = call fast <vscale x 2 x double> @llvm.nearbyint.nxv2f64(<vscale x 2 x double> %in)267 ret <vscale x 2 x double> %1268}269 270define <vscale x 4 x float> @llvm_nearbyint_vscale_f32(<vscale x 4 x float> %in) {271; CHECK-LABEL: @llvm_nearbyint_vscale_f32(272; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.nearbyint.nxv4f32(<vscale x 4 x float> [[IN:%.*]])273; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]274;275 %1 = call fast <vscale x 4 x float> @llvm.nearbyint.nxv4f32(<vscale x 4 x float> %in)276 ret <vscale x 4 x float> %1277}278 279define <vscale x 2 x double> @llvm_pow_vscale_f64(<vscale x 2 x double> %in, <vscale x 2 x double> %pow) {280; CHECK-LABEL: @llvm_pow_vscale_f64(281; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxvv_pow(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x double> [[POW:%.*]], <vscale x 2 x i1> splat (i1 true))282; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]283;284 %1 = call fast <vscale x 2 x double> @llvm.pow.nxv2f64(<vscale x 2 x double> %in, <vscale x 2 x double> %pow)285 ret <vscale x 2 x double> %1286}287 288define <vscale x 4 x float> @llvm_pow_vscale_f32(<vscale x 4 x float> %in, <vscale x 4 x float> %pow) {289; CHECK-LABEL: @llvm_pow_vscale_f32(290; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxvv_powf(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x float> [[POW:%.*]], <vscale x 4 x i1> splat (i1 true))291; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]292;293 %1 = call fast <vscale x 4 x float> @llvm.pow.nxv4f32(<vscale x 4 x float> %in, <vscale x 4 x float> %pow)294 ret <vscale x 4 x float> %1295}296 297define <vscale x 2 x double> @llvm_rint_vscale_f64(<vscale x 2 x double> %in) {298; CHECK-LABEL: @llvm_rint_vscale_f64(299; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.rint.nxv2f64(<vscale x 2 x double> [[IN:%.*]])300; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]301;302 %1 = call fast <vscale x 2 x double> @llvm.rint.nxv2f64(<vscale x 2 x double> %in)303 ret <vscale x 2 x double> %1304}305 306define <vscale x 4 x float> @llvm_rint_vscale_f32(<vscale x 4 x float> %in) {307; CHECK-LABEL: @llvm_rint_vscale_f32(308; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.rint.nxv4f32(<vscale x 4 x float> [[IN:%.*]])309; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]310;311 %1 = call fast <vscale x 4 x float> @llvm.rint.nxv4f32(<vscale x 4 x float> %in)312 ret <vscale x 4 x float> %1313}314 315define <vscale x 2 x double> @llvm_round_vscale_f64(<vscale x 2 x double> %in) {316; CHECK-LABEL: @llvm_round_vscale_f64(317; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.round.nxv2f64(<vscale x 2 x double> [[IN:%.*]])318; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]319;320 %1 = call fast <vscale x 2 x double> @llvm.round.nxv2f64(<vscale x 2 x double> %in)321 ret <vscale x 2 x double> %1322}323 324define <vscale x 4 x float> @llvm_round_vscale_f32(<vscale x 4 x float> %in) {325; CHECK-LABEL: @llvm_round_vscale_f32(326; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.round.nxv4f32(<vscale x 4 x float> [[IN:%.*]])327; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]328;329 %1 = call fast <vscale x 4 x float> @llvm.round.nxv4f32(<vscale x 4 x float> %in)330 ret <vscale x 4 x float> %1331}332 333define <vscale x 2 x double> @llvm_sin_vscale_f64(<vscale x 2 x double> %in) {334; CHECK-LABEL: @llvm_sin_vscale_f64(335; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_sin(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))336; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]337;338 %1 = call fast <vscale x 2 x double> @llvm.sin.nxv2f64(<vscale x 2 x double> %in)339 ret <vscale x 2 x double> %1340}341 342define <vscale x 4 x float> @llvm_sin_vscale_f32(<vscale x 4 x float> %in) {343; CHECK-LABEL: @llvm_sin_vscale_f32(344; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_sinf(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))345; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]346;347 %1 = call fast <vscale x 4 x float> @llvm.sin.nxv4f32(<vscale x 4 x float> %in)348 ret <vscale x 4 x float> %1349}350 351define <vscale x 2 x double> @llvm_sqrt_vscale_f64(<vscale x 2 x double> %in) {352; CHECK-LABEL: @llvm_sqrt_vscale_f64(353; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.sqrt.nxv2f64(<vscale x 2 x double> [[IN:%.*]])354; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]355;356 %1 = call fast <vscale x 2 x double> @llvm.sqrt.nxv2f64(<vscale x 2 x double> %in)357 ret <vscale x 2 x double> %1358}359 360define <vscale x 4 x float> @llvm_sqrt_vscale_f32(<vscale x 4 x float> %in) {361; CHECK-LABEL: @llvm_sqrt_vscale_f32(362; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.sqrt.nxv4f32(<vscale x 4 x float> [[IN:%.*]])363; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]364;365 %1 = call fast <vscale x 4 x float> @llvm.sqrt.nxv4f32(<vscale x 4 x float> %in)366 ret <vscale x 4 x float> %1367}368 369define <vscale x 2 x double> @llvm_tan_vscale_f64(<vscale x 2 x double> %in) {370; CHECK-LABEL: @llvm_tan_vscale_f64(371; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_tan(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))372; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]373;374 %1 = call fast <vscale x 2 x double> @llvm.tan.nxv2f64(<vscale x 2 x double> %in)375 ret <vscale x 2 x double> %1376}377 378define <vscale x 4 x float> @llvm_tan_vscale_f32(<vscale x 4 x float> %in) {379; CHECK-LABEL: @llvm_tan_vscale_f32(380; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_tanf(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))381; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]382;383 %1 = call fast <vscale x 4 x float> @llvm.tan.nxv4f32(<vscale x 4 x float> %in)384 ret <vscale x 4 x float> %1385}386 387define <vscale x 2 x double> @llvm_acos_vscale_f64(<vscale x 2 x double> %in) {388; CHECK-LABEL: @llvm_acos_vscale_f64(389; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_acos(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))390; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]391;392 %1 = call fast <vscale x 2 x double> @llvm.acos.nxv2f64(<vscale x 2 x double> %in)393 ret <vscale x 2 x double> %1394}395 396define <vscale x 4 x float> @llvm_acos_vscale_f32(<vscale x 4 x float> %in) {397; CHECK-LABEL: @llvm_acos_vscale_f32(398; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_acosf(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))399; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]400;401 %1 = call fast <vscale x 4 x float> @llvm.acos.nxv4f32(<vscale x 4 x float> %in)402 ret <vscale x 4 x float> %1403}404 405define <vscale x 2 x double> @llvm_asin_vscale_f64(<vscale x 2 x double> %in) {406; CHECK-LABEL: @llvm_asin_vscale_f64(407; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_asin(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))408; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]409;410 %1 = call fast <vscale x 2 x double> @llvm.asin.nxv2f64(<vscale x 2 x double> %in)411 ret <vscale x 2 x double> %1412}413 414define <vscale x 4 x float> @llvm_asin_vscale_f32(<vscale x 4 x float> %in) {415; CHECK-LABEL: @llvm_asin_vscale_f32(416; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_asinf(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))417; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]418;419 %1 = call fast <vscale x 4 x float> @llvm.asin.nxv4f32(<vscale x 4 x float> %in)420 ret <vscale x 4 x float> %1421}422 423define <vscale x 2 x double> @llvm_atan_vscale_f64(<vscale x 2 x double> %in) {424; CHECK-LABEL: @llvm_atan_vscale_f64(425; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_atan(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))426; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]427;428 %1 = call fast <vscale x 2 x double> @llvm.atan.nxv2f64(<vscale x 2 x double> %in)429 ret <vscale x 2 x double> %1430}431 432define <vscale x 4 x float> @llvm_atan_vscale_f32(<vscale x 4 x float> %in) {433; CHECK-LABEL: @llvm_atan_vscale_f32(434; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_atanf(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))435; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]436;437 %1 = call fast <vscale x 4 x float> @llvm.atan.nxv4f32(<vscale x 4 x float> %in)438 ret <vscale x 4 x float> %1439}440 441define <vscale x 2 x double> @llvm_atan2_vscale_f64(<vscale x 2 x double> %x, <vscale x 2 x double> %y) {442; CHECK-LABEL: @llvm_atan2_vscale_f64(443; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxvv_atan2(<vscale x 2 x double> [[X:%.*]], <vscale x 2 x double> [[Y:%.*]], <vscale x 2 x i1> splat (i1 true))444; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]445;446 %1 = call fast <vscale x 2 x double> @llvm.atan2.nxv2f64(<vscale x 2 x double> %x, <vscale x 2 x double> %y)447 ret <vscale x 2 x double> %1448}449 450define <vscale x 4 x float> @llvm_atan2_vscale_f32(<vscale x 4 x float> %x, <vscale x 4 x float> %y) {451; CHECK-LABEL: @llvm_atan2_vscale_f32(452; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxvv_atan2f(<vscale x 4 x float> [[X:%.*]], <vscale x 4 x float> [[Y:%.*]], <vscale x 4 x i1> splat (i1 true))453; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]454;455 %1 = call fast <vscale x 4 x float> @llvm.atan2.nxv4f32(<vscale x 4 x float> %x, <vscale x 4 x float> %y)456 ret <vscale x 4 x float> %1457}458 459define <vscale x 2 x double> @llvm_cosh_vscale_f64(<vscale x 2 x double> %in) {460; CHECK-LABEL: @llvm_cosh_vscale_f64(461; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_cosh(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))462; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]463;464 %1 = call fast <vscale x 2 x double> @llvm.cosh.nxv2f64(<vscale x 2 x double> %in)465 ret <vscale x 2 x double> %1466}467 468define <vscale x 4 x float> @llvm_cosh_vscale_f32(<vscale x 4 x float> %in) {469; CHECK-LABEL: @llvm_cosh_vscale_f32(470; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_coshf(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))471; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]472;473 %1 = call fast <vscale x 4 x float> @llvm.cosh.nxv4f32(<vscale x 4 x float> %in)474 ret <vscale x 4 x float> %1475}476 477define <vscale x 2 x double> @llvm_sinh_vscale_f64(<vscale x 2 x double> %in) {478; CHECK-LABEL: @llvm_sinh_vscale_f64(479; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_sinh(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))480; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]481;482 %1 = call fast <vscale x 2 x double> @llvm.sinh.nxv2f64(<vscale x 2 x double> %in)483 ret <vscale x 2 x double> %1484}485 486define <vscale x 4 x float> @llvm_sinh_vscale_f32(<vscale x 4 x float> %in) {487; CHECK-LABEL: @llvm_sinh_vscale_f32(488; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_sinhf(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))489; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]490;491 %1 = call fast <vscale x 4 x float> @llvm.sinh.nxv4f32(<vscale x 4 x float> %in)492 ret <vscale x 4 x float> %1493}494 495define <vscale x 2 x double> @llvm_tanh_vscale_f64(<vscale x 2 x double> %in) {496; CHECK-LABEL: @llvm_tanh_vscale_f64(497; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @_ZGVsMxv_tanh(<vscale x 2 x double> [[IN:%.*]], <vscale x 2 x i1> splat (i1 true))498; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]499;500 %1 = call fast <vscale x 2 x double> @llvm.tanh.nxv2f64(<vscale x 2 x double> %in)501 ret <vscale x 2 x double> %1502}503 504define <vscale x 4 x float> @llvm_tanh_vscale_f32(<vscale x 4 x float> %in) {505; CHECK-LABEL: @llvm_tanh_vscale_f32(506; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @_ZGVsMxv_tanhf(<vscale x 4 x float> [[IN:%.*]], <vscale x 4 x i1> splat (i1 true))507; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]508;509 %1 = call fast <vscale x 4 x float> @llvm.tanh.nxv4f32(<vscale x 4 x float> %in)510 ret <vscale x 4 x float> %1511}512 513 514define <vscale x 2 x double> @llvm_trunc_vscale_f64(<vscale x 2 x double> %in) {515; CHECK-LABEL: @llvm_trunc_vscale_f64(516; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 2 x double> @llvm.trunc.nxv2f64(<vscale x 2 x double> [[IN:%.*]])517; CHECK-NEXT: ret <vscale x 2 x double> [[TMP1]]518;519 %1 = call fast <vscale x 2 x double> @llvm.trunc.nxv2f64(<vscale x 2 x double> %in)520 ret <vscale x 2 x double> %1521}522 523define <vscale x 4 x float> @llvm_trunc_vscale_f32(<vscale x 4 x float> %in) {524; CHECK-LABEL: @llvm_trunc_vscale_f32(525; CHECK-NEXT: [[TMP1:%.*]] = call fast <vscale x 4 x float> @llvm.trunc.nxv4f32(<vscale x 4 x float> [[IN:%.*]])526; CHECK-NEXT: ret <vscale x 4 x float> [[TMP1]]527;528 %1 = call fast <vscale x 4 x float> @llvm.trunc.nxv4f32(<vscale x 4 x float> %in)529 ret <vscale x 4 x float> %1530}531 532declare <vscale x 2 x double> @llvm.ceil.nxv2f64(<vscale x 2 x double>)533declare <vscale x 4 x float> @llvm.ceil.nxv4f32(<vscale x 4 x float>)534declare <vscale x 2 x double> @llvm.copysign.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>)535declare <vscale x 4 x float> @llvm.copysign.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>)536declare <vscale x 2 x double> @llvm.cos.nxv2f64(<vscale x 2 x double>)537declare <vscale x 4 x float> @llvm.cos.nxv4f32(<vscale x 4 x float>)538declare <vscale x 2 x double> @llvm.exp.nxv2f64(<vscale x 2 x double>)539declare <vscale x 4 x float> @llvm.exp.nxv4f32(<vscale x 4 x float>)540declare <vscale x 2 x double> @llvm.exp2.nxv2f64(<vscale x 2 x double>)541declare <vscale x 4 x float> @llvm.exp2.nxv4f32(<vscale x 4 x float>)542declare <vscale x 2 x double> @llvm.exp10.nxv2f64(<vscale x 2 x double>)543declare <vscale x 4 x float> @llvm.exp10.nxv4f32(<vscale x 4 x float>)544declare <vscale x 2 x double> @llvm.fabs.nxv2f64(<vscale x 2 x double>)545declare <vscale x 4 x float> @llvm.fabs.nxv4f32(<vscale x 4 x float>)546declare <vscale x 2 x double> @llvm.floor.nxv2f64(<vscale x 2 x double>)547declare <vscale x 4 x float> @llvm.floor.nxv4f32(<vscale x 4 x float>)548declare <vscale x 2 x double> @llvm.fma.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>)549declare <vscale x 4 x float> @llvm.fma.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>)550declare <vscale x 2 x double> @llvm.log.nxv2f64(<vscale x 2 x double>)551declare <vscale x 4 x float> @llvm.log.nxv4f32(<vscale x 4 x float>)552declare <vscale x 2 x double> @llvm.log10.nxv2f64(<vscale x 2 x double>)553declare <vscale x 4 x float> @llvm.log10.nxv4f32(<vscale x 4 x float>)554declare <vscale x 2 x double> @llvm.log2.nxv2f64(<vscale x 2 x double>)555declare <vscale x 4 x float> @llvm.log2.nxv4f32(<vscale x 4 x float>)556declare <vscale x 2 x double> @llvm.maxnum.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>)557declare <vscale x 4 x float> @llvm.maxnum.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>)558declare <vscale x 2 x double> @llvm.minnum.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>)559declare <vscale x 4 x float> @llvm.minnum.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>)560declare <vscale x 2 x double> @llvm.nearbyint.nxv2f64(<vscale x 2 x double>)561declare <vscale x 4 x float> @llvm.nearbyint.nxv4f32(<vscale x 4 x float>)562declare <vscale x 2 x double> @llvm.pow.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>)563declare <vscale x 4 x float> @llvm.pow.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>)564declare <vscale x 2 x double> @llvm.rint.nxv2f64(<vscale x 2 x double>)565declare <vscale x 4 x float> @llvm.rint.nxv4f32(<vscale x 4 x float>)566declare <vscale x 2 x double> @llvm.round.nxv2f64(<vscale x 2 x double>)567declare <vscale x 4 x float> @llvm.round.nxv4f32(<vscale x 4 x float>)568declare <vscale x 2 x double> @llvm.sin.nxv2f64(<vscale x 2 x double>)569declare <vscale x 4 x float> @llvm.sin.nxv4f32(<vscale x 4 x float>)570declare <vscale x 2 x double> @llvm.sqrt.nxv2f64(<vscale x 2 x double>)571declare <vscale x 4 x float> @llvm.sqrt.nxv4f32(<vscale x 4 x float>)572declare <vscale x 2 x double> @llvm.tan.nxv2f64(<vscale x 2 x double>)573declare <vscale x 4 x float> @llvm.tan.nxv4f32(<vscale x 4 x float>)574declare <vscale x 2 x double> @llvm.trunc.nxv2f64(<vscale x 2 x double>)575declare <vscale x 4 x float> @llvm.trunc.nxv4f32(<vscale x 4 x float>)576;.577; CHECK: attributes #[[ATTR0:[0-9]+]] = { "target-features"="+sve" }578; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) "target-features"="+sve" }579;.580