brintos

brintos / llvm-project-archived public Read only

0
0
Text · 17.1 KiB · 9be98b3 Raw
456 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 @_Z4sqrtf(float)5declare <2 x float> @_Z4sqrtDv2_f(<2 x float>)6declare <3 x float> @_Z4sqrtDv3_f(<3 x float>)7declare <4 x float> @_Z4sqrtDv4_f(<4 x float>)8declare <8 x float> @_Z4sqrtDv8_f(<8 x float>)9declare <16 x float> @_Z4sqrtDv16_f(<16 x float>)10 11declare double @_Z4sqrtd(double)12declare <2 x double> @_Z4sqrtDv2_d(<2 x double>)13declare <3 x double> @_Z4sqrtDv3_d(<3 x double>)14declare <4 x double> @_Z4sqrtDv4_d(<4 x double>)15declare <8 x double> @_Z4sqrtDv8_d(<8 x double>)16declare <16 x double> @_Z4sqrtDv16_d(<16 x double>)17 18declare half @_Z4sqrtDh(half)19declare <2 x half> @_Z4sqrtDv2_Dh(<2 x half>)20declare <3 x half> @_Z4sqrtDv3_Dh(<3 x half>)21declare <4 x half> @_Z4sqrtDv4_Dh(<4 x half>)22declare <8 x half> @_Z4sqrtDv8_Dh(<8 x half>)23declare <16 x half> @_Z4sqrtDv16_Dh(<16 x half>)24 25define float @test_sqrt_f32(float %arg) {26; CHECK-LABEL: define float @test_sqrt_f3227; CHECK-SAME: (float [[ARG:%.*]]) {28; CHECK-NEXT:    [[SQRT:%.*]] = tail call float @llvm.sqrt.f32(float [[ARG]]), !fpmath [[META0:![0-9]+]]29; CHECK-NEXT:    ret float [[SQRT]]30;31  %sqrt = tail call float @_Z4sqrtf(float %arg), !fpmath !032  ret float %sqrt33}34 35define <2 x float> @test_sqrt_v2f32(<2 x float> %arg) {36; CHECK-LABEL: define <2 x float> @test_sqrt_v2f3237; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {38; CHECK-NEXT:    [[SQRT:%.*]] = tail call <2 x float> @llvm.sqrt.v2f32(<2 x float> [[ARG]]), !fpmath [[META0]]39; CHECK-NEXT:    ret <2 x float> [[SQRT]]40;41  %sqrt = tail call <2 x float> @_Z4sqrtDv2_f(<2 x float> %arg), !fpmath !042  ret <2 x float> %sqrt43}44 45define <3 x float> @test_sqrt_v3f32(<3 x float> %arg) {46; CHECK-LABEL: define <3 x float> @test_sqrt_v3f3247; CHECK-SAME: (<3 x float> [[ARG:%.*]]) {48; CHECK-NEXT:    [[SQRT:%.*]] = tail call <3 x float> @llvm.sqrt.v3f32(<3 x float> [[ARG]]), !fpmath [[META0]]49; CHECK-NEXT:    ret <3 x float> [[SQRT]]50;51  %sqrt = tail call <3 x float> @_Z4sqrtDv3_f(<3 x float> %arg), !fpmath !052  ret <3 x float> %sqrt53}54 55define <4 x float> @test_sqrt_v4f32(<4 x float> %arg) {56; CHECK-LABEL: define <4 x float> @test_sqrt_v4f3257; CHECK-SAME: (<4 x float> [[ARG:%.*]]) {58; CHECK-NEXT:    [[SQRT:%.*]] = tail call <4 x float> @llvm.sqrt.v4f32(<4 x float> [[ARG]]), !fpmath [[META0]]59; CHECK-NEXT:    ret <4 x float> [[SQRT]]60;61  %sqrt = tail call <4 x float> @_Z4sqrtDv4_f(<4 x float> %arg), !fpmath !062  ret <4 x float> %sqrt63}64 65define <8 x float> @test_sqrt_v8f32(<8 x float> %arg) {66; CHECK-LABEL: define <8 x float> @test_sqrt_v8f3267; CHECK-SAME: (<8 x float> [[ARG:%.*]]) {68; CHECK-NEXT:    [[SQRT:%.*]] = tail call <8 x float> @llvm.sqrt.v8f32(<8 x float> [[ARG]]), !fpmath [[META0]]69; CHECK-NEXT:    ret <8 x float> [[SQRT]]70;71  %sqrt = tail call <8 x float> @_Z4sqrtDv8_f(<8 x float> %arg), !fpmath !072  ret <8 x float> %sqrt73}74 75define <16 x float> @test_sqrt_v16f32(<16 x float> %arg) {76; CHECK-LABEL: define <16 x float> @test_sqrt_v16f3277; CHECK-SAME: (<16 x float> [[ARG:%.*]]) {78; CHECK-NEXT:    [[SQRT:%.*]] = tail call <16 x float> @llvm.sqrt.v16f32(<16 x float> [[ARG]]), !fpmath [[META0]]79; CHECK-NEXT:    ret <16 x float> [[SQRT]]80;81  %sqrt = tail call <16 x float> @_Z4sqrtDv16_f(<16 x float> %arg), !fpmath !082  ret <16 x float> %sqrt83}84 85define float @test_sqrt_cr_f32(float %arg) {86; CHECK-LABEL: define float @test_sqrt_cr_f3287; CHECK-SAME: (float [[ARG:%.*]]) {88; CHECK-NEXT:    [[SQRT:%.*]] = tail call float @llvm.sqrt.f32(float [[ARG]])89; CHECK-NEXT:    ret float [[SQRT]]90;91  %sqrt = tail call float @_Z4sqrtf(float %arg)92  ret float %sqrt93}94 95define <2 x float> @test_sqrt_cr_v2f32(<2 x float> %arg) {96; CHECK-LABEL: define <2 x float> @test_sqrt_cr_v2f3297; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {98; CHECK-NEXT:    [[SQRT:%.*]] = tail call <2 x float> @llvm.sqrt.v2f32(<2 x float> [[ARG]])99; CHECK-NEXT:    ret <2 x float> [[SQRT]]100;101  %sqrt = tail call <2 x float> @_Z4sqrtDv2_f(<2 x float> %arg)102  ret <2 x float> %sqrt103}104 105define <3 x float> @test_sqrt_cr_v3f32(<3 x float> %arg) {106; CHECK-LABEL: define <3 x float> @test_sqrt_cr_v3f32107; CHECK-SAME: (<3 x float> [[ARG:%.*]]) {108; CHECK-NEXT:    [[SQRT:%.*]] = tail call <3 x float> @llvm.sqrt.v3f32(<3 x float> [[ARG]])109; CHECK-NEXT:    ret <3 x float> [[SQRT]]110;111  %sqrt = tail call <3 x float> @_Z4sqrtDv3_f(<3 x float> %arg)112  ret <3 x float> %sqrt113}114 115define <4 x float> @test_sqrt_cr_v4f32(<4 x float> %arg) {116; CHECK-LABEL: define <4 x float> @test_sqrt_cr_v4f32117; CHECK-SAME: (<4 x float> [[ARG:%.*]]) {118; CHECK-NEXT:    [[SQRT:%.*]] = tail call <4 x float> @llvm.sqrt.v4f32(<4 x float> [[ARG]])119; CHECK-NEXT:    ret <4 x float> [[SQRT]]120;121  %sqrt = tail call <4 x float> @_Z4sqrtDv4_f(<4 x float> %arg)122  ret <4 x float> %sqrt123}124 125define <8 x float> @test_sqrt_cr_v8f32(<8 x float> %arg) {126; CHECK-LABEL: define <8 x float> @test_sqrt_cr_v8f32127; CHECK-SAME: (<8 x float> [[ARG:%.*]]) {128; CHECK-NEXT:    [[SQRT:%.*]] = tail call <8 x float> @llvm.sqrt.v8f32(<8 x float> [[ARG]])129; CHECK-NEXT:    ret <8 x float> [[SQRT]]130;131  %sqrt = tail call <8 x float> @_Z4sqrtDv8_f(<8 x float> %arg)132  ret <8 x float> %sqrt133}134 135define <16 x float> @test_sqrt_cr_v16f32(<16 x float> %arg) {136; CHECK-LABEL: define <16 x float> @test_sqrt_cr_v16f32137; CHECK-SAME: (<16 x float> [[ARG:%.*]]) {138; CHECK-NEXT:    [[SQRT:%.*]] = tail call <16 x float> @llvm.sqrt.v16f32(<16 x float> [[ARG]])139; CHECK-NEXT:    ret <16 x float> [[SQRT]]140;141  %sqrt = tail call <16 x float> @_Z4sqrtDv16_f(<16 x float> %arg)142  ret <16 x float> %sqrt143}144 145define double @test_sqrt_f64(double %arg) {146; CHECK-LABEL: define double @test_sqrt_f64147; CHECK-SAME: (double [[ARG:%.*]]) {148; CHECK-NEXT:    [[SQRT:%.*]] = tail call double @llvm.sqrt.f64(double [[ARG]])149; CHECK-NEXT:    ret double [[SQRT]]150;151  %sqrt = tail call double @_Z4sqrtd(double %arg)152  ret double %sqrt153}154 155define <2 x double> @test_sqrt_v2f64(<2 x double> %arg) {156; CHECK-LABEL: define <2 x double> @test_sqrt_v2f64157; CHECK-SAME: (<2 x double> [[ARG:%.*]]) {158; CHECK-NEXT:    [[SQRT:%.*]] = tail call <2 x double> @llvm.sqrt.v2f64(<2 x double> [[ARG]])159; CHECK-NEXT:    ret <2 x double> [[SQRT]]160;161  %sqrt = tail call <2 x double> @_Z4sqrtDv2_d(<2 x double> %arg)162  ret <2 x double> %sqrt163}164 165define <3 x double> @test_sqrt_v3f64(<3 x double> %arg) {166; CHECK-LABEL: define <3 x double> @test_sqrt_v3f64167; CHECK-SAME: (<3 x double> [[ARG:%.*]]) {168; CHECK-NEXT:    [[SQRT:%.*]] = tail call <3 x double> @llvm.sqrt.v3f64(<3 x double> [[ARG]])169; CHECK-NEXT:    ret <3 x double> [[SQRT]]170;171  %sqrt = tail call <3 x double> @_Z4sqrtDv3_d(<3 x double> %arg)172  ret <3 x double> %sqrt173}174 175define <4 x double> @test_sqrt_v4f64(<4 x double> %arg) {176; CHECK-LABEL: define <4 x double> @test_sqrt_v4f64177; CHECK-SAME: (<4 x double> [[ARG:%.*]]) {178; CHECK-NEXT:    [[SQRT:%.*]] = tail call <4 x double> @llvm.sqrt.v4f64(<4 x double> [[ARG]])179; CHECK-NEXT:    ret <4 x double> [[SQRT]]180;181  %sqrt = tail call <4 x double> @_Z4sqrtDv4_d(<4 x double> %arg)182  ret <4 x double> %sqrt183}184 185define <8 x double> @test_sqrt_v8f64(<8 x double> %arg) {186; CHECK-LABEL: define <8 x double> @test_sqrt_v8f64187; CHECK-SAME: (<8 x double> [[ARG:%.*]]) {188; CHECK-NEXT:    [[SQRT:%.*]] = tail call <8 x double> @llvm.sqrt.v8f64(<8 x double> [[ARG]])189; CHECK-NEXT:    ret <8 x double> [[SQRT]]190;191  %sqrt = tail call <8 x double> @_Z4sqrtDv8_d(<8 x double> %arg)192  ret <8 x double> %sqrt193}194 195define <16 x double> @test_sqrt_v16f64(<16 x double> %arg) {196; CHECK-LABEL: define <16 x double> @test_sqrt_v16f64197; CHECK-SAME: (<16 x double> [[ARG:%.*]]) {198; CHECK-NEXT:    [[SQRT:%.*]] = tail call <16 x double> @llvm.sqrt.v16f64(<16 x double> [[ARG]])199; CHECK-NEXT:    ret <16 x double> [[SQRT]]200;201  %sqrt = tail call <16 x double> @_Z4sqrtDv16_d(<16 x double> %arg)202  ret <16 x double> %sqrt203}204 205define half @test_sqrt_f16(half %arg) {206; CHECK-LABEL: define half @test_sqrt_f16207; CHECK-SAME: (half [[ARG:%.*]]) {208; CHECK-NEXT:    [[SQRT:%.*]] = tail call half @llvm.sqrt.f16(half [[ARG]])209; CHECK-NEXT:    ret half [[SQRT]]210;211  %sqrt = tail call half @_Z4sqrtDh(half %arg)212  ret half %sqrt213}214 215define <2 x half> @test_sqrt_v2f16(<2 x half> %arg) {216; CHECK-LABEL: define <2 x half> @test_sqrt_v2f16217; CHECK-SAME: (<2 x half> [[ARG:%.*]]) {218; CHECK-NEXT:    [[SQRT:%.*]] = tail call <2 x half> @llvm.sqrt.v2f16(<2 x half> [[ARG]])219; CHECK-NEXT:    ret <2 x half> [[SQRT]]220;221  %sqrt = tail call <2 x half> @_Z4sqrtDv2_Dh(<2 x half> %arg)222  ret <2 x half> %sqrt223}224 225define <3 x half> @test_sqrt_v3f16(<3 x half> %arg) {226; CHECK-LABEL: define <3 x half> @test_sqrt_v3f16227; CHECK-SAME: (<3 x half> [[ARG:%.*]]) {228; CHECK-NEXT:    [[SQRT:%.*]] = tail call <3 x half> @llvm.sqrt.v3f16(<3 x half> [[ARG]])229; CHECK-NEXT:    ret <3 x half> [[SQRT]]230;231  %sqrt = tail call <3 x half> @_Z4sqrtDv3_Dh(<3 x half> %arg)232  ret <3 x half> %sqrt233}234 235define <4 x half> @test_sqrt_v4f16(<4 x half> %arg) {236; CHECK-LABEL: define <4 x half> @test_sqrt_v4f16237; CHECK-SAME: (<4 x half> [[ARG:%.*]]) {238; CHECK-NEXT:    [[SQRT:%.*]] = tail call <4 x half> @llvm.sqrt.v4f16(<4 x half> [[ARG]])239; CHECK-NEXT:    ret <4 x half> [[SQRT]]240;241  %sqrt = tail call <4 x half> @_Z4sqrtDv4_Dh(<4 x half> %arg)242  ret <4 x half> %sqrt243}244 245define <8 x half> @test_sqrt_v8f16(<8 x half> %arg) {246; CHECK-LABEL: define <8 x half> @test_sqrt_v8f16247; CHECK-SAME: (<8 x half> [[ARG:%.*]]) {248; CHECK-NEXT:    [[SQRT:%.*]] = tail call <8 x half> @llvm.sqrt.v8f16(<8 x half> [[ARG]])249; CHECK-NEXT:    ret <8 x half> [[SQRT]]250;251  %sqrt = tail call <8 x half> @_Z4sqrtDv8_Dh(<8 x half> %arg)252  ret <8 x half> %sqrt253}254 255define <16 x half> @test_sqrt_v16f16(<16 x half> %arg) {256; CHECK-LABEL: define <16 x half> @test_sqrt_v16f16257; CHECK-SAME: (<16 x half> [[ARG:%.*]]) {258; CHECK-NEXT:    [[SQRT:%.*]] = tail call <16 x half> @llvm.sqrt.v16f16(<16 x half> [[ARG]])259; CHECK-NEXT:    ret <16 x half> [[SQRT]]260;261  %sqrt = tail call <16 x half> @_Z4sqrtDv16_Dh(<16 x half> %arg)262  ret <16 x half> %sqrt263}264 265define float @test_sqrt_f32_nobuiltin_callsite(float %arg) {266; CHECK-LABEL: define float @test_sqrt_f32_nobuiltin_callsite267; CHECK-SAME: (float [[ARG:%.*]]) {268; CHECK-NEXT:    [[SQRT:%.*]] = tail call float @_Z4sqrtf(float [[ARG]]) #[[ATTR3:[0-9]+]], !fpmath [[META0]]269; CHECK-NEXT:    ret float [[SQRT]]270;271  %sqrt = tail call float @_Z4sqrtf(float %arg) #0, !fpmath !0272  ret float %sqrt273}274 275define <2 x float> @test_sqrt_v2f32_nobuiltin_callsite(<2 x float> %arg) {276; CHECK-LABEL: define <2 x float> @test_sqrt_v2f32_nobuiltin_callsite277; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {278; CHECK-NEXT:    [[SQRT:%.*]] = tail call <2 x float> @_Z4sqrtDv2_f(<2 x float> [[ARG]]) #[[ATTR3]], !fpmath [[META0]]279; CHECK-NEXT:    ret <2 x float> [[SQRT]]280;281  %sqrt = tail call <2 x float> @_Z4sqrtDv2_f(<2 x float> %arg) #0, !fpmath !0282  ret <2 x float> %sqrt283}284 285define float @test_sqrt_cr_f32_nobuiltin_callsite(float %arg) {286; CHECK-LABEL: define float @test_sqrt_cr_f32_nobuiltin_callsite287; CHECK-SAME: (float [[ARG:%.*]]) {288; CHECK-NEXT:    [[SQRT:%.*]] = tail call float @_Z4sqrtf(float [[ARG]]) #[[ATTR3]]289; CHECK-NEXT:    ret float [[SQRT]]290;291  %sqrt = tail call float @_Z4sqrtf(float %arg) #0292  ret float %sqrt293}294 295define <2 x float> @test_sqrt_cr_v2f32_nobuiltin_callsite(<2 x float> %arg) {296; CHECK-LABEL: define <2 x float> @test_sqrt_cr_v2f32_nobuiltin_callsite297; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {298; CHECK-NEXT:    [[SQRT:%.*]] = tail call <2 x float> @_Z4sqrtDv2_f(<2 x float> [[ARG]]) #[[ATTR3]]299; CHECK-NEXT:    ret <2 x float> [[SQRT]]300;301  %sqrt = tail call <2 x float> @_Z4sqrtDv2_f(<2 x float> %arg) #0302  ret <2 x float> %sqrt303}304 305; "no-builtins" should be ignored306define float @test_sqrt_f32_nobuiltins(float %arg) #1 {307; CHECK-LABEL: define float @test_sqrt_f32_nobuiltins308; CHECK-SAME: (float [[ARG:%.*]]) #[[ATTR0:[0-9]+]] {309; CHECK-NEXT:    [[SQRT:%.*]] = tail call float @_Z4sqrtf(float [[ARG]]) #[[ATTR3]], !fpmath [[META0]]310; CHECK-NEXT:    ret float [[SQRT]]311;312  %sqrt = tail call float @_Z4sqrtf(float %arg) #0, !fpmath !0313  ret float %sqrt314}315 316define <2 x float> @test_sqrt_v2f32_nobuiltins(<2 x float> %arg) #1 {317; CHECK-LABEL: define <2 x float> @test_sqrt_v2f32_nobuiltins318; CHECK-SAME: (<2 x float> [[ARG:%.*]]) #[[ATTR0]] {319; CHECK-NEXT:    [[SQRT:%.*]] = tail call <2 x float> @_Z4sqrtDv2_f(<2 x float> [[ARG]]) #[[ATTR3]], !fpmath [[META0]]320; CHECK-NEXT:    ret <2 x float> [[SQRT]]321;322  %sqrt = tail call <2 x float> @_Z4sqrtDv2_f(<2 x float> %arg) #0, !fpmath !0323  ret <2 x float> %sqrt324}325 326define float @test_sqrt_cr_f32_nobuiltins(float %arg) #1 {327; CHECK-LABEL: define float @test_sqrt_cr_f32_nobuiltins328; CHECK-SAME: (float [[ARG:%.*]]) #[[ATTR0]] {329; CHECK-NEXT:    [[SQRT:%.*]] = tail call float @_Z4sqrtf(float [[ARG]]) #[[ATTR3]]330; CHECK-NEXT:    ret float [[SQRT]]331;332  %sqrt = tail call float @_Z4sqrtf(float %arg) #0333  ret float %sqrt334}335 336define <2 x float> @test_sqrt_cr_v2f32_nobuiltins(<2 x float> %arg) #1 {337; CHECK-LABEL: define <2 x float> @test_sqrt_cr_v2f32_nobuiltins338; CHECK-SAME: (<2 x float> [[ARG:%.*]]) #[[ATTR0]] {339; CHECK-NEXT:    [[SQRT:%.*]] = tail call <2 x float> @_Z4sqrtDv2_f(<2 x float> [[ARG]]) #[[ATTR3]]340; CHECK-NEXT:    ret <2 x float> [[SQRT]]341;342  %sqrt = tail call <2 x float> @_Z4sqrtDv2_f(<2 x float> %arg) #0343  ret <2 x float> %sqrt344}345 346define float @test_sqrt_f32_preserve_flags(float %arg) {347; CHECK-LABEL: define float @test_sqrt_f32_preserve_flags348; CHECK-SAME: (float [[ARG:%.*]]) {349; CHECK-NEXT:    [[SQRT:%.*]] = tail call nnan ninf float @llvm.sqrt.f32(float [[ARG]]), !fpmath [[META0]]350; CHECK-NEXT:    ret float [[SQRT]]351;352  %sqrt = tail call nnan ninf float @_Z4sqrtf(float %arg), !fpmath !0353  ret float %sqrt354}355 356define <2 x float> @test_sqrt_v2f32_preserve_flags(<2 x float> %arg) {357; CHECK-LABEL: define <2 x float> @test_sqrt_v2f32_preserve_flags358; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {359; CHECK-NEXT:    [[SQRT:%.*]] = tail call nnan nsz contract <2 x float> @llvm.sqrt.v2f32(<2 x float> [[ARG]]), !fpmath [[META0]]360; CHECK-NEXT:    ret <2 x float> [[SQRT]]361;362  %sqrt = tail call contract nsz nnan <2 x float> @_Z4sqrtDv2_f(<2 x float> %arg), !fpmath !0363  ret <2 x float> %sqrt364}365 366define float @test_sqrt_f32_preserve_flags_md(float %arg) {367; CHECK-LABEL: define float @test_sqrt_f32_preserve_flags_md368; CHECK-SAME: (float [[ARG:%.*]]) {369; CHECK-NEXT:    [[SQRT:%.*]] = tail call nnan ninf float @llvm.sqrt.f32(float [[ARG]]), !fpmath [[META0]], !foo [[META1:![0-9]+]]370; CHECK-NEXT:    ret float [[SQRT]]371;372  %sqrt = tail call nnan ninf float @_Z4sqrtf(float %arg), !fpmath !0, !foo !1373  ret float %sqrt374}375 376define <2 x float> @test_sqrt_v2f32_preserve_flags_md(<2 x float> %arg) {377; CHECK-LABEL: define <2 x float> @test_sqrt_v2f32_preserve_flags_md378; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {379; CHECK-NEXT:    [[SQRT:%.*]] = tail call nnan nsz contract <2 x float> @llvm.sqrt.v2f32(<2 x float> [[ARG]]), !fpmath [[META0]], !foo [[META1]]380; CHECK-NEXT:    ret <2 x float> [[SQRT]]381;382  %sqrt = tail call contract nsz nnan <2 x float> @_Z4sqrtDv2_f(<2 x float> %arg), !fpmath !0, !foo !1383  ret <2 x float> %sqrt384}385 386define float @test_sqrt_cr_f32_preserve_flags(float %arg) {387; CHECK-LABEL: define float @test_sqrt_cr_f32_preserve_flags388; CHECK-SAME: (float [[ARG:%.*]]) {389; CHECK-NEXT:    [[SQRT:%.*]] = tail call ninf contract float @llvm.sqrt.f32(float [[ARG]])390; CHECK-NEXT:    ret float [[SQRT]]391;392  %sqrt = tail call ninf contract float @_Z4sqrtf(float %arg)393  ret float %sqrt394}395 396define <2 x float> @test_sqrt_cr_v2f32_preserve_flags(<2 x float> %arg) {397; CHECK-LABEL: define <2 x float> @test_sqrt_cr_v2f32_preserve_flags398; CHECK-SAME: (<2 x float> [[ARG:%.*]]) {399; CHECK-NEXT:    [[SQRT:%.*]] = tail call nnan nsz <2 x float> @llvm.sqrt.v2f32(<2 x float> [[ARG]])400; CHECK-NEXT:    ret <2 x float> [[SQRT]]401;402  %sqrt = tail call nnan nsz <2 x float> @_Z4sqrtDv2_f(<2 x float> %arg)403  ret <2 x float> %sqrt404}405 406; Test the libm name, not a recognized opencl builtin.407declare float @sqrtf(float) #2408declare double @sqrt(double) #2409 410define float @test_libm_sqrt_f32(float %arg) {411; CHECK-LABEL: define float @test_libm_sqrt_f32412; CHECK-SAME: (float [[ARG:%.*]]) {413; CHECK-NEXT:    [[SQRT:%.*]] = tail call float @sqrtf(float [[ARG]])414; CHECK-NEXT:    ret float [[SQRT]]415;416  %sqrt = tail call float @sqrtf(float %arg)417  ret float %sqrt418}419 420define float @test_libm_sqrt_f32_fpmath(float %arg) {421; CHECK-LABEL: define float @test_libm_sqrt_f32_fpmath422; CHECK-SAME: (float [[ARG:%.*]]) {423; CHECK-NEXT:    [[SQRT:%.*]] = tail call float @sqrtf(float [[ARG]]), !fpmath [[META0]]424; CHECK-NEXT:    ret float [[SQRT]]425;426  %sqrt = tail call float @sqrtf(float %arg), !fpmath !0427  ret float %sqrt428}429 430define double @test_libm_sqrt_f64(double %arg) {431; CHECK-LABEL: define double @test_libm_sqrt_f64432; CHECK-SAME: (double [[ARG:%.*]]) {433; CHECK-NEXT:    [[SQRT:%.*]] = tail call double @sqrt(double [[ARG]])434; CHECK-NEXT:    ret double [[SQRT]]435;436  %sqrt = tail call double @sqrt(double %arg)437  ret double %sqrt438}439 440define double @test_libm_sqrt_f64_fpmath(double %arg) {441; CHECK-LABEL: define double @test_libm_sqrt_f64_fpmath442; CHECK-SAME: (double [[ARG:%.*]]) {443; CHECK-NEXT:    [[SQRT:%.*]] = tail call double @sqrt(double [[ARG]]), !fpmath [[META0]]444; CHECK-NEXT:    ret double [[SQRT]]445;446  %sqrt = tail call double @sqrt(double %arg), !fpmath !0447  ret double %sqrt448}449 450attributes #0 = { nobuiltin }451attributes #1 = { "no-builtins" }452attributes #2 = { nounwind memory(none) }453 454!0 = !{float 3.000000e+00}455!1 = !{i32 1234}456