brintos

brintos / llvm-project-archived public Read only

0
0
Text · 21.0 KiB · 6ae0436 Raw
560 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 22; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-simplifylib %s | FileCheck %s3 4declare float @_Z5log10f(float)5declare <2 x float> @_Z5log10Dv2_f(<2 x float>)6declare <3 x float> @_Z5log10Dv3_f(<3 x float>)7declare <4 x float> @_Z5log10Dv4_f(<4 x float>)8declare <8 x float> @_Z5log10Dv8_f(<8 x float>)9declare <16 x float> @_Z5log10Dv16_f(<16 x float>)10 11declare double @_Z5log10d(double)12declare <2 x double> @_Z5log10Dv2_d(<2 x double>)13declare <3 x double> @_Z5log10Dv3_d(<3 x double>)14declare <4 x double> @_Z5log10Dv4_d(<4 x double>)15declare <8 x double> @_Z5log10Dv8_d(<8 x double>)16declare <16 x double> @_Z5log10Dv16_d(<16 x double>)17 18declare half @_Z5log10Dh(half)19declare <2 x half> @_Z5log10Dv2_Dh(<2 x half>)20declare <3 x half> @_Z5log10Dv3_Dh(<3 x half>)21declare <4 x half> @_Z5log10Dv4_Dh(<4 x half>)22declare <8 x half> @_Z5log10Dv8_Dh(<8 x half>)23declare <16 x half> @_Z5log10Dv16_Dh(<16 x half>)24 25define float @test_log10_f32(float %arg) {26; CHECK-LABEL: define float @test_log10_f3227; CHECK-SAME: (float [[ARG:%.*]]) {28; CHECK-NEXT:    [[LOG10:%.*]] = tail call float @_Z5log10f(float [[ARG]]), !fpmath !029; CHECK-NEXT:    ret float [[LOG10]]30;31  %log10 = tail call float @_Z5log10f(float %arg), !fpmath !032  ret float %log1033}34 35define <2 x float> @test_log10_v2f32(<2 x float> %arg) {36; CHECK-LABEL: define <2 x float> @test_log10_v2f3237; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {38; CHECK-NEXT:    [[LOG10:%.*]] = tail call <2 x float> @_Z5log10Dv2_f(<2 x float> [[ARG]]), !fpmath !039; CHECK-NEXT:    ret <2 x float> [[LOG10]]40;41  %log10 = tail call <2 x float> @_Z5log10Dv2_f(<2 x float> %arg), !fpmath !042  ret <2 x float> %log1043}44 45define <3 x float> @test_log10_v3f32(<3 x float> %arg) {46; CHECK-LABEL: define <3 x float> @test_log10_v3f3247; CHECK-SAME: (<3 x float> [[ARG:%.*]]) {48; CHECK-NEXT:    [[LOG10:%.*]] = tail call <3 x float> @_Z5log10Dv3_f(<3 x float> [[ARG]]), !fpmath !049; CHECK-NEXT:    ret <3 x float> [[LOG10]]50;51  %log10 = tail call <3 x float> @_Z5log10Dv3_f(<3 x float> %arg), !fpmath !052  ret <3 x float> %log1053}54 55define <4 x float> @test_log10_v4f32(<4 x float> %arg) {56; CHECK-LABEL: define <4 x float> @test_log10_v4f3257; CHECK-SAME: (<4 x float> [[ARG:%.*]]) {58; CHECK-NEXT:    [[LOG10:%.*]] = tail call <4 x float> @_Z5log10Dv4_f(<4 x float> [[ARG]]), !fpmath !059; CHECK-NEXT:    ret <4 x float> [[LOG10]]60;61  %log10 = tail call <4 x float> @_Z5log10Dv4_f(<4 x float> %arg), !fpmath !062  ret <4 x float> %log1063}64 65define <8 x float> @test_log10_v8f32(<8 x float> %arg) {66; CHECK-LABEL: define <8 x float> @test_log10_v8f3267; CHECK-SAME: (<8 x float> [[ARG:%.*]]) {68; CHECK-NEXT:    [[LOG10:%.*]] = tail call <8 x float> @_Z5log10Dv8_f(<8 x float> [[ARG]]), !fpmath !069; CHECK-NEXT:    ret <8 x float> [[LOG10]]70;71  %log10 = tail call <8 x float> @_Z5log10Dv8_f(<8 x float> %arg), !fpmath !072  ret <8 x float> %log1073}74 75define <16 x float> @test_log10_v16f32(<16 x float> %arg) {76; CHECK-LABEL: define <16 x float> @test_log10_v16f3277; CHECK-SAME: (<16 x float> [[ARG:%.*]]) {78; CHECK-NEXT:    [[LOG10:%.*]] = tail call <16 x float> @_Z5log10Dv16_f(<16 x float> [[ARG]]), !fpmath !079; CHECK-NEXT:    ret <16 x float> [[LOG10]]80;81  %log10 = tail call <16 x float> @_Z5log10Dv16_f(<16 x float> %arg), !fpmath !082  ret <16 x float> %log1083}84 85define float @test_log10_cr_f32(float %arg) {86; CHECK-LABEL: define float @test_log10_cr_f3287; CHECK-SAME: (float [[ARG:%.*]]) {88; CHECK-NEXT:    [[LOG10:%.*]] = tail call float @_Z5log10f(float [[ARG]])89; CHECK-NEXT:    ret float [[LOG10]]90;91  %log10 = tail call float @_Z5log10f(float %arg)92  ret float %log1093}94 95define <2 x float> @test_log10_cr_v2f32(<2 x float> %arg) {96; CHECK-LABEL: define <2 x float> @test_log10_cr_v2f3297; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {98; CHECK-NEXT:    [[LOG10:%.*]] = tail call <2 x float> @_Z5log10Dv2_f(<2 x float> [[ARG]])99; CHECK-NEXT:    ret <2 x float> [[LOG10]]100;101  %log10 = tail call <2 x float> @_Z5log10Dv2_f(<2 x float> %arg)102  ret <2 x float> %log10103}104 105define <3 x float> @test_log10_cr_v3f32(<3 x float> %arg) {106; CHECK-LABEL: define <3 x float> @test_log10_cr_v3f32107; CHECK-SAME: (<3 x float> [[ARG:%.*]]) {108; CHECK-NEXT:    [[LOG10:%.*]] = tail call <3 x float> @_Z5log10Dv3_f(<3 x float> [[ARG]])109; CHECK-NEXT:    ret <3 x float> [[LOG10]]110;111  %log10 = tail call <3 x float> @_Z5log10Dv3_f(<3 x float> %arg)112  ret <3 x float> %log10113}114 115define <4 x float> @test_log10_cr_v4f32(<4 x float> %arg) {116; CHECK-LABEL: define <4 x float> @test_log10_cr_v4f32117; CHECK-SAME: (<4 x float> [[ARG:%.*]]) {118; CHECK-NEXT:    [[LOG10:%.*]] = tail call <4 x float> @_Z5log10Dv4_f(<4 x float> [[ARG]])119; CHECK-NEXT:    ret <4 x float> [[LOG10]]120;121  %log10 = tail call <4 x float> @_Z5log10Dv4_f(<4 x float> %arg)122  ret <4 x float> %log10123}124 125define <8 x float> @test_log10_cr_v8f32(<8 x float> %arg) {126; CHECK-LABEL: define <8 x float> @test_log10_cr_v8f32127; CHECK-SAME: (<8 x float> [[ARG:%.*]]) {128; CHECK-NEXT:    [[LOG10:%.*]] = tail call <8 x float> @_Z5log10Dv8_f(<8 x float> [[ARG]])129; CHECK-NEXT:    ret <8 x float> [[LOG10]]130;131  %log10 = tail call <8 x float> @_Z5log10Dv8_f(<8 x float> %arg)132  ret <8 x float> %log10133}134 135define <16 x float> @test_log10_cr_v16f32(<16 x float> %arg) {136; CHECK-LABEL: define <16 x float> @test_log10_cr_v16f32137; CHECK-SAME: (<16 x float> [[ARG:%.*]]) {138; CHECK-NEXT:    [[LOG10:%.*]] = tail call <16 x float> @_Z5log10Dv16_f(<16 x float> [[ARG]])139; CHECK-NEXT:    ret <16 x float> [[LOG10]]140;141  %log10 = tail call <16 x float> @_Z5log10Dv16_f(<16 x float> %arg)142  ret <16 x float> %log10143}144 145define double @test_log10_f64(double %arg) {146; CHECK-LABEL: define double @test_log10_f64147; CHECK-SAME: (double [[ARG:%.*]]) {148; CHECK-NEXT:    [[LOG10:%.*]] = tail call double @_Z5log10d(double [[ARG]])149; CHECK-NEXT:    ret double [[LOG10]]150;151  %log10 = tail call double @_Z5log10d(double %arg)152  ret double %log10153}154 155define <2 x double> @test_log10_v2f64(<2 x double> %arg) {156; CHECK-LABEL: define <2 x double> @test_log10_v2f64157; CHECK-SAME: (<2 x double> [[ARG:%.*]]) {158; CHECK-NEXT:    [[LOG10:%.*]] = tail call <2 x double> @_Z5log10Dv2_d(<2 x double> [[ARG]])159; CHECK-NEXT:    ret <2 x double> [[LOG10]]160;161  %log10 = tail call <2 x double> @_Z5log10Dv2_d(<2 x double> %arg)162  ret <2 x double> %log10163}164 165define <3 x double> @test_log10_v3f64(<3 x double> %arg) {166; CHECK-LABEL: define <3 x double> @test_log10_v3f64167; CHECK-SAME: (<3 x double> [[ARG:%.*]]) {168; CHECK-NEXT:    [[LOG10:%.*]] = tail call <3 x double> @_Z5log10Dv3_d(<3 x double> [[ARG]])169; CHECK-NEXT:    ret <3 x double> [[LOG10]]170;171  %log10 = tail call <3 x double> @_Z5log10Dv3_d(<3 x double> %arg)172  ret <3 x double> %log10173}174 175define <4 x double> @test_log10_v4f64(<4 x double> %arg) {176; CHECK-LABEL: define <4 x double> @test_log10_v4f64177; CHECK-SAME: (<4 x double> [[ARG:%.*]]) {178; CHECK-NEXT:    [[LOG10:%.*]] = tail call <4 x double> @_Z5log10Dv4_d(<4 x double> [[ARG]])179; CHECK-NEXT:    ret <4 x double> [[LOG10]]180;181  %log10 = tail call <4 x double> @_Z5log10Dv4_d(<4 x double> %arg)182  ret <4 x double> %log10183}184 185define <8 x double> @test_log10_v8f64(<8 x double> %arg) {186; CHECK-LABEL: define <8 x double> @test_log10_v8f64187; CHECK-SAME: (<8 x double> [[ARG:%.*]]) {188; CHECK-NEXT:    [[LOG10:%.*]] = tail call <8 x double> @_Z5log10Dv8_d(<8 x double> [[ARG]])189; CHECK-NEXT:    ret <8 x double> [[LOG10]]190;191  %log10 = tail call <8 x double> @_Z5log10Dv8_d(<8 x double> %arg)192  ret <8 x double> %log10193}194 195define <16 x double> @test_log10_v16f64(<16 x double> %arg) {196; CHECK-LABEL: define <16 x double> @test_log10_v16f64197; CHECK-SAME: (<16 x double> [[ARG:%.*]]) {198; CHECK-NEXT:    [[LOG10:%.*]] = tail call <16 x double> @_Z5log10Dv16_d(<16 x double> [[ARG]])199; CHECK-NEXT:    ret <16 x double> [[LOG10]]200;201  %log10 = tail call <16 x double> @_Z5log10Dv16_d(<16 x double> %arg)202  ret <16 x double> %log10203}204 205define half @test_log10_f16(half %arg) {206; CHECK-LABEL: define half @test_log10_f16207; CHECK-SAME: (half [[ARG:%.*]]) {208; CHECK-NEXT:    [[LOG10:%.*]] = tail call half @_Z5log10Dh(half [[ARG]])209; CHECK-NEXT:    ret half [[LOG10]]210;211  %log10 = tail call half @_Z5log10Dh(half %arg)212  ret half %log10213}214 215define half @test_log10_f16_fast(half %arg) {216; CHECK-LABEL: define half @test_log10_f16_fast217; CHECK-SAME: (half [[ARG:%.*]]) {218; CHECK-NEXT:    [[LOG10:%.*]] = tail call fast half @llvm.log10.f16(half [[ARG]])219; CHECK-NEXT:    ret half [[LOG10]]220;221  %log10 = tail call fast half @_Z5log10Dh(half %arg)222  ret half %log10223}224 225define <2 x half> @test_log10_v2f16(<2 x half> %arg) {226; CHECK-LABEL: define <2 x half> @test_log10_v2f16227; CHECK-SAME: (<2 x half> [[ARG:%.*]]) {228; CHECK-NEXT:    [[LOG10:%.*]] = tail call <2 x half> @_Z5log10Dv2_Dh(<2 x half> [[ARG]])229; CHECK-NEXT:    ret <2 x half> [[LOG10]]230;231  %log10 = tail call <2 x half> @_Z5log10Dv2_Dh(<2 x half> %arg)232  ret <2 x half> %log10233}234 235define <3 x half> @test_log10_v3f16(<3 x half> %arg) {236; CHECK-LABEL: define <3 x half> @test_log10_v3f16237; CHECK-SAME: (<3 x half> [[ARG:%.*]]) {238; CHECK-NEXT:    [[LOG10:%.*]] = tail call <3 x half> @_Z5log10Dv3_Dh(<3 x half> [[ARG]])239; CHECK-NEXT:    ret <3 x half> [[LOG10]]240;241  %log10 = tail call <3 x half> @_Z5log10Dv3_Dh(<3 x half> %arg)242  ret <3 x half> %log10243}244 245define <4 x half> @test_log10_v4f16(<4 x half> %arg) {246; CHECK-LABEL: define <4 x half> @test_log10_v4f16247; CHECK-SAME: (<4 x half> [[ARG:%.*]]) {248; CHECK-NEXT:    [[LOG10:%.*]] = tail call <4 x half> @_Z5log10Dv4_Dh(<4 x half> [[ARG]])249; CHECK-NEXT:    ret <4 x half> [[LOG10]]250;251  %log10 = tail call <4 x half> @_Z5log10Dv4_Dh(<4 x half> %arg)252  ret <4 x half> %log10253}254 255define <8 x half> @test_log10_v8f16(<8 x half> %arg) {256; CHECK-LABEL: define <8 x half> @test_log10_v8f16257; CHECK-SAME: (<8 x half> [[ARG:%.*]]) {258; CHECK-NEXT:    [[LOG10:%.*]] = tail call <8 x half> @_Z5log10Dv8_Dh(<8 x half> [[ARG]])259; CHECK-NEXT:    ret <8 x half> [[LOG10]]260;261  %log10 = tail call <8 x half> @_Z5log10Dv8_Dh(<8 x half> %arg)262  ret <8 x half> %log10263}264 265define <16 x half> @test_log10_v16f16(<16 x half> %arg) {266; CHECK-LABEL: define <16 x half> @test_log10_v16f16267; CHECK-SAME: (<16 x half> [[ARG:%.*]]) {268; CHECK-NEXT:    [[LOG10:%.*]] = tail call <16 x half> @_Z5log10Dv16_Dh(<16 x half> [[ARG]])269; CHECK-NEXT:    ret <16 x half> [[LOG10]]270;271  %log10 = tail call <16 x half> @_Z5log10Dv16_Dh(<16 x half> %arg)272  ret <16 x half> %log10273}274 275define float @test_log10_f32_nobuiltin_callsite(float %arg) {276; CHECK-LABEL: define float @test_log10_f32_nobuiltin_callsite277; CHECK-SAME: (float [[ARG:%.*]]) {278; CHECK-NEXT:    [[LOG10:%.*]] = tail call float @_Z5log10f(float [[ARG]]) #[[ATTR6:[0-9]+]], !fpmath !0279; CHECK-NEXT:    ret float [[LOG10]]280;281  %log10 = tail call float @_Z5log10f(float %arg) #0, !fpmath !0282  ret float %log10283}284 285define <2 x float> @test_log10_v2f32_nobuiltin_callsite(<2 x float> %arg) {286; CHECK-LABEL: define <2 x float> @test_log10_v2f32_nobuiltin_callsite287; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {288; CHECK-NEXT:    [[LOG10:%.*]] = tail call <2 x float> @_Z5log10Dv2_f(<2 x float> [[ARG]]) #[[ATTR6]], !fpmath !0289; CHECK-NEXT:    ret <2 x float> [[LOG10]]290;291  %log10 = tail call <2 x float> @_Z5log10Dv2_f(<2 x float> %arg) #0, !fpmath !0292  ret <2 x float> %log10293}294 295define float @test_log10_cr_f32_nobuiltin_callsite(float %arg) {296; CHECK-LABEL: define float @test_log10_cr_f32_nobuiltin_callsite297; CHECK-SAME: (float [[ARG:%.*]]) {298; CHECK-NEXT:    [[LOG10:%.*]] = tail call float @_Z5log10f(float [[ARG]]) #[[ATTR6]]299; CHECK-NEXT:    ret float [[LOG10]]300;301  %log10 = tail call float @_Z5log10f(float %arg) #0302  ret float %log10303}304 305define <2 x float> @test_log10_cr_v2f32_nobuiltin_callsite(<2 x float> %arg) {306; CHECK-LABEL: define <2 x float> @test_log10_cr_v2f32_nobuiltin_callsite307; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {308; CHECK-NEXT:    [[LOG10:%.*]] = tail call <2 x float> @_Z5log10Dv2_f(<2 x float> [[ARG]]) #[[ATTR6]]309; CHECK-NEXT:    ret <2 x float> [[LOG10]]310;311  %log10 = tail call <2 x float> @_Z5log10Dv2_f(<2 x float> %arg) #0312  ret <2 x float> %log10313}314 315; "no-builtins" should be ignored316define float @test_log10_f32_nobuiltins(float %arg) #1 {317; CHECK-LABEL: define float @test_log10_f32_nobuiltins318; CHECK-SAME: (float [[ARG:%.*]]) #[[ATTR0:[0-9]+]] {319; CHECK-NEXT:    [[LOG10:%.*]] = tail call float @_Z5log10f(float [[ARG]]) #[[ATTR6]], !fpmath !0320; CHECK-NEXT:    ret float [[LOG10]]321;322  %log10 = tail call float @_Z5log10f(float %arg) #0, !fpmath !0323  ret float %log10324}325 326define <2 x float> @test_log10_v2f32_nobuiltins(<2 x float> %arg) #1 {327; CHECK-LABEL: define <2 x float> @test_log10_v2f32_nobuiltins328; CHECK-SAME: (<2 x float> [[ARG:%.*]]) #[[ATTR0]] {329; CHECK-NEXT:    [[LOG10:%.*]] = tail call <2 x float> @_Z5log10Dv2_f(<2 x float> [[ARG]]) #[[ATTR6]], !fpmath !0330; CHECK-NEXT:    ret <2 x float> [[LOG10]]331;332  %log10 = tail call <2 x float> @_Z5log10Dv2_f(<2 x float> %arg) #0, !fpmath !0333  ret <2 x float> %log10334}335 336define float @test_log10_cr_f32_nobuiltins(float %arg) #1 {337; CHECK-LABEL: define float @test_log10_cr_f32_nobuiltins338; CHECK-SAME: (float [[ARG:%.*]]) #[[ATTR0]] {339; CHECK-NEXT:    [[LOG10:%.*]] = tail call float @_Z5log10f(float [[ARG]]) #[[ATTR6]]340; CHECK-NEXT:    ret float [[LOG10]]341;342  %log10 = tail call float @_Z5log10f(float %arg) #0343  ret float %log10344}345 346define <2 x float> @test_log10_cr_v2f32_nobuiltins(<2 x float> %arg) #1 {347; CHECK-LABEL: define <2 x float> @test_log10_cr_v2f32_nobuiltins348; CHECK-SAME: (<2 x float> [[ARG:%.*]]) #[[ATTR0]] {349; CHECK-NEXT:    [[LOG10:%.*]] = tail call <2 x float> @_Z5log10Dv2_f(<2 x float> [[ARG]]) #[[ATTR6]]350; CHECK-NEXT:    ret <2 x float> [[LOG10]]351;352  %log10 = tail call <2 x float> @_Z5log10Dv2_f(<2 x float> %arg) #0353  ret <2 x float> %log10354}355 356define float @test_log10_f32_preserve_flags(float %arg) {357; CHECK-LABEL: define float @test_log10_f32_preserve_flags358; CHECK-SAME: (float [[ARG:%.*]]) {359; CHECK-NEXT:    [[LOG10:%.*]] = tail call nnan ninf float @llvm.log10.f32(float [[ARG]]), !fpmath !0360; CHECK-NEXT:    ret float [[LOG10]]361;362  %log10 = tail call nnan ninf float @_Z5log10f(float %arg), !fpmath !0363  ret float %log10364}365 366define <2 x float> @test_log10_v2f32_preserve_flags(<2 x float> %arg) {367; CHECK-LABEL: define <2 x float> @test_log10_v2f32_preserve_flags368; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {369; CHECK-NEXT:    [[LOG10:%.*]] = tail call nnan nsz contract <2 x float> @llvm.log10.v2f32(<2 x float> [[ARG]]), !fpmath !0370; CHECK-NEXT:    ret <2 x float> [[LOG10]]371;372  %log10 = tail call contract nsz nnan <2 x float> @_Z5log10Dv2_f(<2 x float> %arg), !fpmath !0373  ret <2 x float> %log10374}375 376define float @test_log10_f32_preserve_flags_md(float %arg) {377; CHECK-LABEL: define float @test_log10_f32_preserve_flags_md378; CHECK-SAME: (float [[ARG:%.*]]) {379; CHECK-NEXT:    [[LOG10:%.*]] = tail call nnan ninf float @llvm.log10.f32(float [[ARG]]), !fpmath !0, !foo !1380; CHECK-NEXT:    ret float [[LOG10]]381;382  %log10 = tail call nnan ninf float @_Z5log10f(float %arg), !fpmath !0, !foo !1383  ret float %log10384}385 386define <2 x float> @test_log10_v2f32_preserve_flags_md(<2 x float> %arg) {387; CHECK-LABEL: define <2 x float> @test_log10_v2f32_preserve_flags_md388; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {389; CHECK-NEXT:    [[LOG10:%.*]] = tail call nnan nsz contract <2 x float> @llvm.log10.v2f32(<2 x float> [[ARG]]), !fpmath !0, !foo !1390; CHECK-NEXT:    ret <2 x float> [[LOG10]]391;392  %log10 = tail call contract nsz nnan <2 x float> @_Z5log10Dv2_f(<2 x float> %arg), !fpmath !0, !foo !1393  ret <2 x float> %log10394}395 396define float @test_log10_cr_f32_preserve_flags(float %arg) {397; CHECK-LABEL: define float @test_log10_cr_f32_preserve_flags398; CHECK-SAME: (float [[ARG:%.*]]) {399; CHECK-NEXT:    [[LOG10:%.*]] = tail call ninf contract float @llvm.log10.f32(float [[ARG]])400; CHECK-NEXT:    ret float [[LOG10]]401;402  %log10 = tail call ninf contract float @_Z5log10f(float %arg)403  ret float %log10404}405 406define <2 x float> @test_log10_cr_v2f32_preserve_flags(<2 x float> %arg) {407; CHECK-LABEL: define <2 x float> @test_log10_cr_v2f32_preserve_flags408; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {409; CHECK-NEXT:    [[LOG10:%.*]] = tail call nnan nsz <2 x float> @llvm.log10.v2f32(<2 x float> [[ARG]])410; CHECK-NEXT:    ret <2 x float> [[LOG10]]411;412  %log10 = tail call nnan nsz <2 x float> @_Z5log10Dv2_f(<2 x float> %arg)413  ret <2 x float> %log10414}415 416; Test the libm name, not a recognized opencl builtin.417declare float @log10f(float) #2418declare double @log10(double) #2419 420define float @test_libm_log10_f32(float %arg) {421; CHECK-LABEL: define float @test_libm_log10_f32422; CHECK-SAME: (float [[ARG:%.*]]) {423; CHECK-NEXT:    [[LOG10:%.*]] = tail call float @log10f(float [[ARG]])424; CHECK-NEXT:    ret float [[LOG10]]425;426  %log10 = tail call float @log10f(float %arg)427  ret float %log10428}429 430define float @test_libm_log10_f32_fast(float %arg) {431; CHECK-LABEL: define float @test_libm_log10_f32_fast432; CHECK-SAME: (float [[ARG:%.*]]) {433; CHECK-NEXT:    [[LOG10:%.*]] = tail call fast float @log10f(float [[ARG]])434; CHECK-NEXT:    ret float [[LOG10]]435;436  %log10 = tail call fast float @log10f(float %arg)437  ret float %log10438}439 440define float @test_libm_log10_f32_fpmath(float %arg) {441; CHECK-LABEL: define float @test_libm_log10_f32_fpmath442; CHECK-SAME: (float [[ARG:%.*]]) {443; CHECK-NEXT:    [[LOG10:%.*]] = tail call float @log10f(float [[ARG]]), !fpmath !0444; CHECK-NEXT:    ret float [[LOG10]]445;446  %log10 = tail call float @log10f(float %arg), !fpmath !0447  ret float %log10448}449 450define double @test_libm_log10_f64(double %arg) {451; CHECK-LABEL: define double @test_libm_log10_f64452; CHECK-SAME: (double [[ARG:%.*]]) {453; CHECK-NEXT:    [[LOG10:%.*]] = tail call double @log10(double [[ARG]])454; CHECK-NEXT:    ret double [[LOG10]]455;456  %log10 = tail call double @log10(double %arg)457  ret double %log10458}459 460define double @test_libm_log10_f64_fast(double %arg) {461; CHECK-LABEL: define double @test_libm_log10_f64_fast462; CHECK-SAME: (double [[ARG:%.*]]) {463; CHECK-NEXT:    [[LOG10:%.*]] = tail call fast double @log10(double [[ARG]])464; CHECK-NEXT:    ret double [[LOG10]]465;466  %log10 = tail call fast double @log10(double %arg)467  ret double %log10468}469 470define double @test_libm_log10_f64_fpmath(double %arg) {471; CHECK-LABEL: define double @test_libm_log10_f64_fpmath472; CHECK-SAME: (double [[ARG:%.*]]) {473; CHECK-NEXT:    [[LOG10:%.*]] = tail call double @log10(double [[ARG]]), !fpmath !0474; CHECK-NEXT:    ret double [[LOG10]]475;476  %log10 = tail call double @log10(double %arg), !fpmath !0477  ret double %log10478}479 480define float @test_log10_f32_fast_noinline(float %arg) {481; CHECK-LABEL: define float @test_log10_f32_fast_noinline482; CHECK-SAME: (float [[ARG:%.*]]) {483; CHECK-NEXT:    [[LOG10:%.*]] = tail call fast float @_Z5log10f(float [[ARG]]) #[[ATTR7:[0-9]+]], !fpmath !0484; CHECK-NEXT:    ret float [[LOG10]]485;486  %log10 = tail call fast float @_Z5log10f(float %arg) #3, !fpmath !0487  ret float %log10488}489 490define float @test_log10_f32_fast_optsize(float %arg) #4 {491; CHECK-LABEL: define float @test_log10_f32_fast_optsize492; CHECK-SAME: (float [[ARG:%.*]]) #[[ATTR2:[0-9]+]] {493; CHECK-NEXT:    [[LOG10:%.*]] = tail call fast float @llvm.log10.f32(float [[ARG]]), !fpmath !0494; CHECK-NEXT:    ret float [[LOG10]]495;496  %log10 = tail call fast float @_Z5log10f(float %arg), !fpmath !0497  ret float %log10498}499 500define float @test_log10_f32_fast_minsize(float %arg) #5 {501; CHECK-LABEL: define float @test_log10_f32_fast_minsize502; CHECK-SAME: (float [[ARG:%.*]]) #[[ATTR3:[0-9]+]] {503; CHECK-NEXT:    [[LOG10:%.*]] = tail call fast float @llvm.log10.f32(float [[ARG]]), !fpmath !0504; CHECK-NEXT:    ret float [[LOG10]]505;506  %log10 = tail call fast float @_Z5log10f(float %arg), !fpmath !0507  ret float %log10508}509 510define float @test_log10_f32_nsz_contract_optsize(float %arg) #4 {511; CHECK-LABEL: define float @test_log10_f32_nsz_contract_optsize512; CHECK-SAME: (float [[ARG:%.*]]) #[[ATTR2]] {513; CHECK-NEXT:    [[LOG10:%.*]] = tail call nsz contract float @llvm.log10.f32(float [[ARG]]), !fpmath !0514; CHECK-NEXT:    ret float [[LOG10]]515;516  %log10 = tail call nsz contract float @_Z5log10f(float %arg), !fpmath !0517  ret float %log10518}519 520define float @test_log10_f32_nsz_contract_minsize(float %arg) #5 {521; CHECK-LABEL: define float @test_log10_f32_nsz_contract_minsize522; CHECK-SAME: (float [[ARG:%.*]]) #[[ATTR3]] {523; CHECK-NEXT:    [[LOG10:%.*]] = tail call nsz contract float @_Z5log10f(float [[ARG]]), !fpmath !0524; CHECK-NEXT:    ret float [[LOG10]]525;526  %log10 = tail call nsz contract float @_Z5log10f(float %arg), !fpmath !0527  ret float %log10528}529 530define half @test_log10_f16_fast_minsize(half %arg) #5 {531; CHECK-LABEL: define half @test_log10_f16_fast_minsize532; CHECK-SAME: (half [[ARG:%.*]]) #[[ATTR3]] {533; CHECK-NEXT:    [[LOG10:%.*]] = tail call fast half @llvm.log10.f16(half [[ARG]])534; CHECK-NEXT:    ret half [[LOG10]]535;536  %log10 = tail call fast half @_Z5log10Dh(half %arg)537  ret half %log10538}539 540define float @test_log10_f32_strictfp(float %arg) #6 {541; CHECK-LABEL: define float @test_log10_f32_strictfp542; CHECK-SAME: (float [[ARG:%.*]]) #[[ATTR4:[0-9]+]] {543; CHECK-NEXT:    [[LOG:%.*]] = tail call nsz float @_Z5log10f(float [[ARG]]) #[[ATTR4]]544; CHECK-NEXT:    ret float [[LOG]]545;546  %log = tail call nsz float @_Z5log10f(float %arg) #6547  ret float %log548}549 550attributes #0 = { nobuiltin }551attributes #1 = { "no-builtins" }552attributes #2 = { nounwind memory(none) }553attributes #3 = { noinline }554attributes #4 = { optsize }555attributes #5 = { minsize }556attributes #6 = { strictfp }557 558!0 = !{float 3.000000e+00}559!1 = !{i32 1234}560