2718 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,instcombine -amdgpu-prelink %s | FileCheck %s3 4declare float @_Z3powff(float, float)5declare <2 x float> @_Z3powDv2_fS_(<2 x float>, <2 x float>)6declare <3 x float> @_Z3powDv3_fS_(<3 x float>, <3 x float>)7declare <4 x float> @_Z3powDv4_fS_(<4 x float>, <4 x float>)8declare <8 x float> @_Z3powDv8_fS_(<8 x float>, <8 x float>)9declare <16 x float> @_Z3powDv16_fS_(<16 x float>, <16 x float>)10declare double @_Z3powdd(double, double)11declare <2 x double> @_Z3powDv2_dS_(<2 x double>, <2 x double>)12declare <3 x double> @_Z3powDv3_dS_(<3 x double>, <3 x double>)13declare <4 x double> @_Z3powDv4_dS_(<4 x double>, <4 x double>)14declare <8 x double> @_Z3powDv8_dS_(<8 x double>, <8 x double>)15declare <16 x double> @_Z3powDv16_dS_(<16 x double>, <16 x double>)16declare half @_Z3powDhDh(half, half)17declare <2 x half> @_Z3powDv2_DhS_(<2 x half>, <2 x half>)18declare <3 x half> @_Z3powDv3_DhS_(<3 x half>, <3 x half>)19declare <4 x half> @_Z3powDv4_DhS_(<4 x half>, <4 x half>)20declare <8 x half> @_Z3powDv8_DhS_(<8 x half>, <8 x half>)21declare <16 x half> @_Z3powDv16_DhS_(<16 x half>, <16 x half>)22declare void @llvm.assume(i1 noundef)23declare float @llvm.floor.f32(float)24declare float @llvm.ceil.f32(float)25declare float @llvm.trunc.f32(float)26declare float @llvm.rint.f32(float)27declare float @llvm.nearbyint.f32(float)28declare float @llvm.round.f32(float)29declare float @llvm.roundeven.f32(float)30 31define float @test_pow_fast_f32(float %x, float %y) {32; CHECK-LABEL: define float @test_pow_fast_f3233; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {34; CHECK-NEXT: [[POW:%.*]] = tail call fast float @_Z3powff(float [[X]], float [[Y]])35; CHECK-NEXT: ret float [[POW]]36;37 %pow = tail call fast float @_Z3powff(float %x, float %y)38 ret float %pow39}40 41define <2 x float> @test_pow_fast_v2f32(<2 x float> %x, <2 x float> %y) {42; CHECK-LABEL: define <2 x float> @test_pow_fast_v2f3243; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x float> [[Y:%.*]]) {44; CHECK-NEXT: [[POW:%.*]] = tail call fast <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> [[Y]])45; CHECK-NEXT: ret <2 x float> [[POW]]46;47 %pow = tail call fast <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> %y)48 ret <2 x float> %pow49}50 51define float @test_pow_afn_f32_nnan(float %x, float %y) {52; CHECK-LABEL: define float @test_pow_afn_f32_nnan53; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {54; CHECK-NEXT: [[POW:%.*]] = tail call nnan afn float @_Z3powff(float [[X]], float [[Y]])55; CHECK-NEXT: ret float [[POW]]56;57 %pow = tail call afn nnan float @_Z3powff(float %x, float %y)58 ret float %pow59}60 61define float @test_pow_afn_f32_nnan_ninf(float %x, float %y) {62; CHECK-LABEL: define float @test_pow_afn_f32_nnan_ninf63; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {64; CHECK-NEXT: [[POW:%.*]] = tail call nnan ninf afn float @_Z3powff(float [[X]], float [[Y]])65; CHECK-NEXT: ret float [[POW]]66;67 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float %y)68 ret float %pow69}70 71define <2 x float> @test_pow_afn_v2f32_nnan(<2 x float> %x, <2 x float> %y) {72; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_nnan73; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x float> [[Y:%.*]]) {74; CHECK-NEXT: [[POW:%.*]] = tail call nnan afn <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> [[Y]])75; CHECK-NEXT: ret <2 x float> [[POW]]76;77 %pow = tail call afn nnan <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> %y)78 ret <2 x float> %pow79}80 81define <2 x float> @test_pow_afn_v2f32_nnan_ninf(<2 x float> %x, <2 x float> %y) {82; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_nnan_ninf83; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x float> [[Y:%.*]]) {84; CHECK-NEXT: [[POW:%.*]] = tail call nnan ninf afn <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> [[Y]])85; CHECK-NEXT: ret <2 x float> [[POW]]86;87 %pow = tail call afn nnan ninf <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> %y)88 ret <2 x float> %pow89}90 91define float @test_pow_afn_f32(float %x, float %y) {92; CHECK-LABEL: define float @test_pow_afn_f3293; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {94; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z3powff(float [[X]], float [[Y]])95; CHECK-NEXT: ret float [[POW]]96;97 %pow = tail call afn float @_Z3powff(float %x, float %y)98 ret float %pow99}100 101define <2 x float> @test_pow_afn_v2f32(<2 x float> %x, <2 x float> %y) {102; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32103; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x float> [[Y:%.*]]) {104; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> [[Y]])105; CHECK-NEXT: ret <2 x float> [[POW]]106;107 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> %y)108 ret <2 x float> %pow109}110 111define <3 x float> @test_pow_afn_v3f32(<3 x float> %x, <3 x float> %y) {112; CHECK-LABEL: define <3 x float> @test_pow_afn_v3f32113; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {114; CHECK-NEXT: [[POW:%.*]] = tail call afn <3 x float> @_Z3powDv3_fS_(<3 x float> [[X]], <3 x float> [[Y]])115; CHECK-NEXT: ret <3 x float> [[POW]]116;117 %pow = tail call afn <3 x float> @_Z3powDv3_fS_(<3 x float> %x, <3 x float> %y)118 ret <3 x float> %pow119}120 121define <4 x float> @test_pow_afn_v4f32(<4 x float> %x, <4 x float> %y) {122; CHECK-LABEL: define <4 x float> @test_pow_afn_v4f32123; CHECK-SAME: (<4 x float> [[X:%.*]], <4 x float> [[Y:%.*]]) {124; CHECK-NEXT: [[POW:%.*]] = tail call afn <4 x float> @_Z3powDv4_fS_(<4 x float> [[X]], <4 x float> [[Y]])125; CHECK-NEXT: ret <4 x float> [[POW]]126;127 %pow = tail call afn <4 x float> @_Z3powDv4_fS_(<4 x float> %x, <4 x float> %y)128 ret <4 x float> %pow129}130 131define <8 x float> @test_pow_afn_v8f32(<8 x float> %x, <8 x float> %y) {132; CHECK-LABEL: define <8 x float> @test_pow_afn_v8f32133; CHECK-SAME: (<8 x float> [[X:%.*]], <8 x float> [[Y:%.*]]) {134; CHECK-NEXT: [[POW:%.*]] = tail call afn <8 x float> @_Z3powDv8_fS_(<8 x float> [[X]], <8 x float> [[Y]])135; CHECK-NEXT: ret <8 x float> [[POW]]136;137 %pow = tail call afn <8 x float> @_Z3powDv8_fS_(<8 x float> %x, <8 x float> %y)138 ret <8 x float> %pow139}140 141define <16 x float> @test_pow_afn_v16f32(<16 x float> %x, <16 x float> %y) {142; CHECK-LABEL: define <16 x float> @test_pow_afn_v16f32143; CHECK-SAME: (<16 x float> [[X:%.*]], <16 x float> [[Y:%.*]]) {144; CHECK-NEXT: [[POW:%.*]] = tail call afn <16 x float> @_Z3powDv16_fS_(<16 x float> [[X]], <16 x float> [[Y]])145; CHECK-NEXT: ret <16 x float> [[POW]]146;147 %pow = tail call afn <16 x float> @_Z3powDv16_fS_(<16 x float> %x, <16 x float> %y)148 ret <16 x float> %pow149}150 151define double @test_pow_afn_f64(double %x, double %y) {152; CHECK-LABEL: define double @test_pow_afn_f64153; CHECK-SAME: (double [[X:%.*]], double [[Y:%.*]]) {154; CHECK-NEXT: [[POW:%.*]] = tail call afn double @_Z3powdd(double [[X]], double [[Y]])155; CHECK-NEXT: ret double [[POW]]156;157 %pow = tail call afn double @_Z3powdd(double %x, double %y)158 ret double %pow159}160 161define <2 x double> @test_pow_afn_v2f64(<2 x double> %x, <2 x double> %y) {162; CHECK-LABEL: define <2 x double> @test_pow_afn_v2f64163; CHECK-SAME: (<2 x double> [[X:%.*]], <2 x double> [[Y:%.*]]) {164; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x double> @_Z3powDv2_dS_(<2 x double> [[X]], <2 x double> [[Y]])165; CHECK-NEXT: ret <2 x double> [[POW]]166;167 %pow = tail call afn <2 x double> @_Z3powDv2_dS_(<2 x double> %x, <2 x double> %y)168 ret <2 x double> %pow169}170 171define <3 x double> @test_pow_afn_v3f64(<3 x double> %x, <3 x double> %y) {172; CHECK-LABEL: define <3 x double> @test_pow_afn_v3f64173; CHECK-SAME: (<3 x double> [[X:%.*]], <3 x double> [[Y:%.*]]) {174; CHECK-NEXT: [[POW:%.*]] = tail call afn <3 x double> @_Z3powDv3_dS_(<3 x double> [[X]], <3 x double> [[Y]])175; CHECK-NEXT: ret <3 x double> [[POW]]176;177 %pow = tail call afn <3 x double> @_Z3powDv3_dS_(<3 x double> %x, <3 x double> %y)178 ret <3 x double> %pow179}180 181define <4 x double> @test_pow_afn_v4f64(<4 x double> %x, <4 x double> %y) {182; CHECK-LABEL: define <4 x double> @test_pow_afn_v4f64183; CHECK-SAME: (<4 x double> [[X:%.*]], <4 x double> [[Y:%.*]]) {184; CHECK-NEXT: [[POW:%.*]] = tail call afn <4 x double> @_Z3powDv4_dS_(<4 x double> [[X]], <4 x double> [[Y]])185; CHECK-NEXT: ret <4 x double> [[POW]]186;187 %pow = tail call afn <4 x double> @_Z3powDv4_dS_(<4 x double> %x, <4 x double> %y)188 ret <4 x double> %pow189}190 191define <8 x double> @test_pow_afn_v8f64(<8 x double> %x, <8 x double> %y) {192; CHECK-LABEL: define <8 x double> @test_pow_afn_v8f64193; CHECK-SAME: (<8 x double> [[X:%.*]], <8 x double> [[Y:%.*]]) {194; CHECK-NEXT: [[POW:%.*]] = tail call afn <8 x double> @_Z3powDv8_dS_(<8 x double> [[X]], <8 x double> [[Y]])195; CHECK-NEXT: ret <8 x double> [[POW]]196;197 %pow = tail call afn <8 x double> @_Z3powDv8_dS_(<8 x double> %x, <8 x double> %y)198 ret <8 x double> %pow199}200 201define <16 x double> @test_pow_afn_v16f64(<16 x double> %x, <16 x double> %y) {202; CHECK-LABEL: define <16 x double> @test_pow_afn_v16f64203; CHECK-SAME: (<16 x double> [[X:%.*]], <16 x double> [[Y:%.*]]) {204; CHECK-NEXT: [[POW:%.*]] = tail call afn <16 x double> @_Z3powDv16_dS_(<16 x double> [[X]], <16 x double> [[Y]])205; CHECK-NEXT: ret <16 x double> [[POW]]206;207 %pow = tail call afn <16 x double> @_Z3powDv16_dS_(<16 x double> %x, <16 x double> %y)208 ret <16 x double> %pow209}210 211define half @test_pow_afn_f16(half %x, half %y) {212; CHECK-LABEL: define half @test_pow_afn_f16213; CHECK-SAME: (half [[X:%.*]], half [[Y:%.*]]) {214; CHECK-NEXT: [[POW:%.*]] = tail call afn half @_Z3powDhDh(half [[X]], half [[Y]])215; CHECK-NEXT: ret half [[POW]]216;217 %pow = tail call afn half @_Z3powDhDh(half %x, half %y)218 ret half %pow219}220 221define <2 x half> @test_pow_afn_v2f16(<2 x half> %x, <2 x half> %y) {222; CHECK-LABEL: define <2 x half> @test_pow_afn_v2f16223; CHECK-SAME: (<2 x half> [[X:%.*]], <2 x half> [[Y:%.*]]) {224; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x half> @_Z3powDv2_DhS_(<2 x half> [[X]], <2 x half> [[Y]])225; CHECK-NEXT: ret <2 x half> [[POW]]226;227 %pow = tail call afn <2 x half> @_Z3powDv2_DhS_(<2 x half> %x, <2 x half> %y)228 ret <2 x half> %pow229}230 231define <3 x half> @test_pow_afn_v3f16(<3 x half> %x, <3 x half> %y) {232; CHECK-LABEL: define <3 x half> @test_pow_afn_v3f16233; CHECK-SAME: (<3 x half> [[X:%.*]], <3 x half> [[Y:%.*]]) {234; CHECK-NEXT: [[POW:%.*]] = tail call afn <3 x half> @_Z3powDv3_DhS_(<3 x half> [[X]], <3 x half> [[Y]])235; CHECK-NEXT: ret <3 x half> [[POW]]236;237 %pow = tail call afn <3 x half> @_Z3powDv3_DhS_(<3 x half> %x, <3 x half> %y)238 ret <3 x half> %pow239}240 241define <4 x half> @test_pow_afn_v4f16(<4 x half> %x, <4 x half> %y) {242; CHECK-LABEL: define <4 x half> @test_pow_afn_v4f16243; CHECK-SAME: (<4 x half> [[X:%.*]], <4 x half> [[Y:%.*]]) {244; CHECK-NEXT: [[POW:%.*]] = tail call afn <4 x half> @_Z3powDv4_DhS_(<4 x half> [[X]], <4 x half> [[Y]])245; CHECK-NEXT: ret <4 x half> [[POW]]246;247 %pow = tail call afn <4 x half> @_Z3powDv4_DhS_(<4 x half> %x, <4 x half> %y)248 ret <4 x half> %pow249}250 251define <8 x half> @test_pow_afn_v8f16(<8 x half> %x, <8 x half> %y) {252; CHECK-LABEL: define <8 x half> @test_pow_afn_v8f16253; CHECK-SAME: (<8 x half> [[X:%.*]], <8 x half> [[Y:%.*]]) {254; CHECK-NEXT: [[POW:%.*]] = tail call afn <8 x half> @_Z3powDv8_DhS_(<8 x half> [[X]], <8 x half> [[Y]])255; CHECK-NEXT: ret <8 x half> [[POW]]256;257 %pow = tail call afn <8 x half> @_Z3powDv8_DhS_(<8 x half> %x, <8 x half> %y)258 ret <8 x half> %pow259}260 261define <16 x half> @test_pow_afn_v16f16(<16 x half> %x, <16 x half> %y) {262; CHECK-LABEL: define <16 x half> @test_pow_afn_v16f16263; CHECK-SAME: (<16 x half> [[X:%.*]], <16 x half> [[Y:%.*]]) {264; CHECK-NEXT: [[POW:%.*]] = tail call afn <16 x half> @_Z3powDv16_DhS_(<16 x half> [[X]], <16 x half> [[Y]])265; CHECK-NEXT: ret <16 x half> [[POW]]266;267 %pow = tail call afn <16 x half> @_Z3powDv16_DhS_(<16 x half> %x, <16 x half> %y)268 ret <16 x half> %pow269}270 271define float @test_pow_f32(float %x, float %y) {272; CHECK-LABEL: define float @test_pow_f32273; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {274; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z3powff(float [[X]], float [[Y]])275; CHECK-NEXT: ret float [[POW]]276;277 %pow = tail call float @_Z3powff(float %x, float %y)278 ret float %pow279}280 281define float @test_pow_f32_nnan(float %x, float %y) {282; CHECK-LABEL: define float @test_pow_f32_nnan283; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {284; CHECK-NEXT: [[POW:%.*]] = tail call nnan float @_Z3powff(float [[X]], float [[Y]])285; CHECK-NEXT: ret float [[POW]]286;287 %pow = tail call nnan float @_Z3powff(float %x, float %y)288 ret float %pow289}290 291define <2 x float> @test_pow_v2f32(<2 x float> %x, <2 x float> %y) {292; CHECK-LABEL: define <2 x float> @test_pow_v2f32293; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x float> [[Y:%.*]]) {294; CHECK-NEXT: [[POW:%.*]] = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> [[Y]])295; CHECK-NEXT: ret <2 x float> [[POW]]296;297 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> %y)298 ret <2 x float> %pow299}300 301define <3 x float> @test_pow_v3f32(<3 x float> %x, <3 x float> %y) {302; CHECK-LABEL: define <3 x float> @test_pow_v3f32303; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {304; CHECK-NEXT: [[POW:%.*]] = tail call <3 x float> @_Z3powDv3_fS_(<3 x float> [[X]], <3 x float> [[Y]])305; CHECK-NEXT: ret <3 x float> [[POW]]306;307 %pow = tail call <3 x float> @_Z3powDv3_fS_(<3 x float> %x, <3 x float> %y)308 ret <3 x float> %pow309}310 311define <4 x float> @test_pow_v4f32(<4 x float> %x, <4 x float> %y) {312; CHECK-LABEL: define <4 x float> @test_pow_v4f32313; CHECK-SAME: (<4 x float> [[X:%.*]], <4 x float> [[Y:%.*]]) {314; CHECK-NEXT: [[POW:%.*]] = tail call <4 x float> @_Z3powDv4_fS_(<4 x float> [[X]], <4 x float> [[Y]])315; CHECK-NEXT: ret <4 x float> [[POW]]316;317 %pow = tail call <4 x float> @_Z3powDv4_fS_(<4 x float> %x, <4 x float> %y)318 ret <4 x float> %pow319}320 321define <8 x float> @test_pow_v8f32(<8 x float> %x, <8 x float> %y) {322; CHECK-LABEL: define <8 x float> @test_pow_v8f32323; CHECK-SAME: (<8 x float> [[X:%.*]], <8 x float> [[Y:%.*]]) {324; CHECK-NEXT: [[POW:%.*]] = tail call <8 x float> @_Z3powDv8_fS_(<8 x float> [[X]], <8 x float> [[Y]])325; CHECK-NEXT: ret <8 x float> [[POW]]326;327 %pow = tail call <8 x float> @_Z3powDv8_fS_(<8 x float> %x, <8 x float> %y)328 ret <8 x float> %pow329}330 331define <16 x float> @test_pow_v16f32(<16 x float> %x, <16 x float> %y) {332; CHECK-LABEL: define <16 x float> @test_pow_v16f32333; CHECK-SAME: (<16 x float> [[X:%.*]], <16 x float> [[Y:%.*]]) {334; CHECK-NEXT: [[POW:%.*]] = tail call <16 x float> @_Z3powDv16_fS_(<16 x float> [[X]], <16 x float> [[Y]])335; CHECK-NEXT: ret <16 x float> [[POW]]336;337 %pow = tail call <16 x float> @_Z3powDv16_fS_(<16 x float> %x, <16 x float> %y)338 ret <16 x float> %pow339}340 341define double @test_pow_f64(double %x, double %y) {342; CHECK-LABEL: define double @test_pow_f64343; CHECK-SAME: (double [[X:%.*]], double [[Y:%.*]]) {344; CHECK-NEXT: [[POW:%.*]] = tail call double @_Z3powdd(double [[X]], double [[Y]])345; CHECK-NEXT: ret double [[POW]]346;347 %pow = tail call double @_Z3powdd(double %x, double %y)348 ret double %pow349}350 351define <2 x double> @test_pow_v2f64(<2 x double> %x, <2 x double> %y) {352; CHECK-LABEL: define <2 x double> @test_pow_v2f64353; CHECK-SAME: (<2 x double> [[X:%.*]], <2 x double> [[Y:%.*]]) {354; CHECK-NEXT: [[POW:%.*]] = tail call <2 x double> @_Z3powDv2_dS_(<2 x double> [[X]], <2 x double> [[Y]])355; CHECK-NEXT: ret <2 x double> [[POW]]356;357 %pow = tail call <2 x double> @_Z3powDv2_dS_(<2 x double> %x, <2 x double> %y)358 ret <2 x double> %pow359}360 361define <3 x double> @test_pow_v3f64(<3 x double> %x, <3 x double> %y) {362; CHECK-LABEL: define <3 x double> @test_pow_v3f64363; CHECK-SAME: (<3 x double> [[X:%.*]], <3 x double> [[Y:%.*]]) {364; CHECK-NEXT: [[POW:%.*]] = tail call <3 x double> @_Z3powDv3_dS_(<3 x double> [[X]], <3 x double> [[Y]])365; CHECK-NEXT: ret <3 x double> [[POW]]366;367 %pow = tail call <3 x double> @_Z3powDv3_dS_(<3 x double> %x, <3 x double> %y)368 ret <3 x double> %pow369}370 371define <4 x double> @test_pow_v4f64(<4 x double> %x, <4 x double> %y) {372; CHECK-LABEL: define <4 x double> @test_pow_v4f64373; CHECK-SAME: (<4 x double> [[X:%.*]], <4 x double> [[Y:%.*]]) {374; CHECK-NEXT: [[POW:%.*]] = tail call <4 x double> @_Z3powDv4_dS_(<4 x double> [[X]], <4 x double> [[Y]])375; CHECK-NEXT: ret <4 x double> [[POW]]376;377 %pow = tail call <4 x double> @_Z3powDv4_dS_(<4 x double> %x, <4 x double> %y)378 ret <4 x double> %pow379}380 381define <8 x double> @test_pow_v8f64(<8 x double> %x, <8 x double> %y) {382; CHECK-LABEL: define <8 x double> @test_pow_v8f64383; CHECK-SAME: (<8 x double> [[X:%.*]], <8 x double> [[Y:%.*]]) {384; CHECK-NEXT: [[POW:%.*]] = tail call <8 x double> @_Z3powDv8_dS_(<8 x double> [[X]], <8 x double> [[Y]])385; CHECK-NEXT: ret <8 x double> [[POW]]386;387 %pow = tail call <8 x double> @_Z3powDv8_dS_(<8 x double> %x, <8 x double> %y)388 ret <8 x double> %pow389}390 391define <16 x double> @test_pow_v16f64(<16 x double> %x, <16 x double> %y) {392; CHECK-LABEL: define <16 x double> @test_pow_v16f64393; CHECK-SAME: (<16 x double> [[X:%.*]], <16 x double> [[Y:%.*]]) {394; CHECK-NEXT: [[POW:%.*]] = tail call <16 x double> @_Z3powDv16_dS_(<16 x double> [[X]], <16 x double> [[Y]])395; CHECK-NEXT: ret <16 x double> [[POW]]396;397 %pow = tail call <16 x double> @_Z3powDv16_dS_(<16 x double> %x, <16 x double> %y)398 ret <16 x double> %pow399}400 401define half @test_pow_f16(half %x, half %y) {402; CHECK-LABEL: define half @test_pow_f16403; CHECK-SAME: (half [[X:%.*]], half [[Y:%.*]]) {404; CHECK-NEXT: [[POW:%.*]] = tail call half @_Z3powDhDh(half [[X]], half [[Y]])405; CHECK-NEXT: ret half [[POW]]406;407 %pow = tail call half @_Z3powDhDh(half %x, half %y)408 ret half %pow409}410 411define <2 x half> @test_pow_v2f16(<2 x half> %x, <2 x half> %y) {412; CHECK-LABEL: define <2 x half> @test_pow_v2f16413; CHECK-SAME: (<2 x half> [[X:%.*]], <2 x half> [[Y:%.*]]) {414; CHECK-NEXT: [[POW:%.*]] = tail call <2 x half> @_Z3powDv2_DhS_(<2 x half> [[X]], <2 x half> [[Y]])415; CHECK-NEXT: ret <2 x half> [[POW]]416;417 %pow = tail call <2 x half> @_Z3powDv2_DhS_(<2 x half> %x, <2 x half> %y)418 ret <2 x half> %pow419}420 421define <3 x half> @test_pow_v3f16(<3 x half> %x, <3 x half> %y) {422; CHECK-LABEL: define <3 x half> @test_pow_v3f16423; CHECK-SAME: (<3 x half> [[X:%.*]], <3 x half> [[Y:%.*]]) {424; CHECK-NEXT: [[POW:%.*]] = tail call <3 x half> @_Z3powDv3_DhS_(<3 x half> [[X]], <3 x half> [[Y]])425; CHECK-NEXT: ret <3 x half> [[POW]]426;427 %pow = tail call <3 x half> @_Z3powDv3_DhS_(<3 x half> %x, <3 x half> %y)428 ret <3 x half> %pow429}430 431define <4 x half> @test_pow_v4f16(<4 x half> %x, <4 x half> %y) {432; CHECK-LABEL: define <4 x half> @test_pow_v4f16433; CHECK-SAME: (<4 x half> [[X:%.*]], <4 x half> [[Y:%.*]]) {434; CHECK-NEXT: [[POW:%.*]] = tail call <4 x half> @_Z3powDv4_DhS_(<4 x half> [[X]], <4 x half> [[Y]])435; CHECK-NEXT: ret <4 x half> [[POW]]436;437 %pow = tail call <4 x half> @_Z3powDv4_DhS_(<4 x half> %x, <4 x half> %y)438 ret <4 x half> %pow439}440 441define <8 x half> @test_pow_v8f16(<8 x half> %x, <8 x half> %y) {442; CHECK-LABEL: define <8 x half> @test_pow_v8f16443; CHECK-SAME: (<8 x half> [[X:%.*]], <8 x half> [[Y:%.*]]) {444; CHECK-NEXT: [[POW:%.*]] = tail call <8 x half> @_Z3powDv8_DhS_(<8 x half> [[X]], <8 x half> [[Y]])445; CHECK-NEXT: ret <8 x half> [[POW]]446;447 %pow = tail call <8 x half> @_Z3powDv8_DhS_(<8 x half> %x, <8 x half> %y)448 ret <8 x half> %pow449}450 451define <16 x half> @test_pow_v16f16(<16 x half> %x, <16 x half> %y) {452; CHECK-LABEL: define <16 x half> @test_pow_v16f16453; CHECK-SAME: (<16 x half> [[X:%.*]], <16 x half> [[Y:%.*]]) {454; CHECK-NEXT: [[POW:%.*]] = tail call <16 x half> @_Z3powDv16_DhS_(<16 x half> [[X]], <16 x half> [[Y]])455; CHECK-NEXT: ret <16 x half> [[POW]]456;457 %pow = tail call <16 x half> @_Z3powDv16_DhS_(<16 x half> %x, <16 x half> %y)458 ret <16 x half> %pow459}460 461define float @test_pow_afn_f32_minsize(float %x, float %y) #0 {462; CHECK-LABEL: define float @test_pow_afn_f32_minsize463; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) #[[ATTR2:[0-9]+]] {464; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z3powff(float [[X]], float [[Y]])465; CHECK-NEXT: ret float [[POW]]466;467 %pow = tail call afn float @_Z3powff(float %x, float %y)468 ret float %pow469}470 471define float @test_pow_afn_f32_nnan_minsize(float %x, float %y) #0 {472; CHECK-LABEL: define float @test_pow_afn_f32_nnan_minsize473; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) #[[ATTR2]] {474; CHECK-NEXT: [[POW:%.*]] = tail call nnan afn float @_Z3powff(float [[X]], float [[Y]])475; CHECK-NEXT: ret float [[POW]]476;477 %pow = tail call afn nnan float @_Z3powff(float %x, float %y)478 ret float %pow479}480 481define float @test_pow_afn_f32_noinline(float %x, float %y) {482; CHECK-LABEL: define float @test_pow_afn_f32_noinline483; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {484; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z3powff(float [[X]], float [[Y]]) #[[ATTR5:[0-9]+]]485; CHECK-NEXT: ret float [[POW]]486;487 %pow = tail call afn float @_Z3powff(float %x, float %y) #1488 ret float %pow489}490 491define float @test_pow_afn_f32_nnan_noinline(float %x, float %y) {492; CHECK-LABEL: define float @test_pow_afn_f32_nnan_noinline493; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {494; CHECK-NEXT: [[POW:%.*]] = tail call nnan afn float @_Z3powff(float [[X]], float [[Y]]) #[[ATTR5]]495; CHECK-NEXT: ret float [[POW]]496;497 %pow = tail call afn nnan float @_Z3powff(float %x, float %y) #1498 ret float %pow499}500 501define float @test_pow_afn_f32_strictfp(float %x, float %y) #2 {502; CHECK-LABEL: define float @test_pow_afn_f32_strictfp503; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) #[[ATTR3:[0-9]+]] {504; CHECK-NEXT: [[POW:%.*]] = tail call nnan nsz afn float @_Z3powff(float [[X]], float [[Y]]) #[[ATTR3]]505; CHECK-NEXT: ret float [[POW]]506;507 %pow = tail call afn nsz nnan float @_Z3powff(float %x, float %y) #2508 ret float %pow509}510 511define float @test_pow_fast_f32_nobuiltin(float %x, float %y) {512; CHECK-LABEL: define float @test_pow_fast_f32_nobuiltin513; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {514; CHECK-NEXT: [[POW:%.*]] = tail call fast float @_Z3powff(float [[X]], float [[Y]]) #[[ATTR6:[0-9]+]]515; CHECK-NEXT: ret float [[POW]]516;517 %pow = tail call fast float @_Z3powff(float %x, float %y) #3518 ret float %pow519}520 521define float @test_pow_afn_f32_0.0(float %x) {522; CHECK-LABEL: define float @test_pow_afn_f32_0.0523; CHECK-SAME: (float [[X:%.*]]) {524; CHECK-NEXT: ret float 1.000000e+00525;526 %pow = tail call afn float @_Z3powff(float %x, float 0.0)527 ret float %pow528}529 530define float @test_pow_afn_f32_neg0.0(float %x) {531; CHECK-LABEL: define float @test_pow_afn_f32_neg0.0532; CHECK-SAME: (float [[X:%.*]]) {533; CHECK-NEXT: ret float 1.000000e+00534;535 %pow = tail call afn float @_Z3powff(float %x, float -0.0)536 ret float %pow537}538 539define <2 x float> @test_pow_afn_v2f32_0.0(<2 x float> %x) {540; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_0.0541; CHECK-SAME: (<2 x float> [[X:%.*]]) {542; CHECK-NEXT: ret <2 x float> splat (float 1.000000e+00)543;544 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 0.0, float 0.0>)545 ret <2 x float> %pow546}547 548define <2 x float> @test_pow_afn_v2f32_neg0.0(<2 x float> %x) {549; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_neg0.0550; CHECK-SAME: (<2 x float> [[X:%.*]]) {551; CHECK-NEXT: ret <2 x float> splat (float 1.000000e+00)552;553 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -0.0, float -0.0>)554 ret <2 x float> %pow555}556 557define <2 x float> @test_pow_afn_v2f32_plus_minus_0.0(<2 x float> %x) {558; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_plus_minus_0.0559; CHECK-SAME: (<2 x float> [[X:%.*]]) {560; CHECK-NEXT: ret <2 x float> splat (float 1.000000e+00)561;562 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 0.0, float -0.0>)563 ret <2 x float> %pow564}565 566define <3 x float> @test_pow_afn_v3f32_0.0_splat_undef(<3 x float> %x, <3 x float> %y) {567; CHECK-LABEL: define <3 x float> @test_pow_afn_v3f32_0.0_splat_undef568; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {569; CHECK-NEXT: ret <3 x float> splat (float 1.000000e+00)570;571 %pow = tail call afn <3 x float> @_Z3powDv3_fS_(<3 x float> %x, <3 x float> <float 0.0, float poison, float 0.0>)572 ret <3 x float> %pow573}574 575define <3 x float> @test_pow_afn_v3f32_neg0.0_splat_undef(<3 x float> %x, <3 x float> %y) {576; CHECK-LABEL: define <3 x float> @test_pow_afn_v3f32_neg0.0_splat_undef577; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {578; CHECK-NEXT: ret <3 x float> splat (float 1.000000e+00)579;580 %pow = tail call afn <3 x float> @_Z3powDv3_fS_(<3 x float> %x, <3 x float> <float -0.0, float poison, float -0.0>)581 ret <3 x float> %pow582}583 584define float @test_pow_afn_f32_0.5(float %x) {585; CHECK-LABEL: define float @test_pow_afn_f32_0.5586; CHECK-SAME: (float [[X:%.*]]) {587; CHECK-NEXT: [[__POW2SQRT:%.*]] = call afn float @_Z4sqrtf(float [[X]])588; CHECK-NEXT: ret float [[__POW2SQRT]]589;590 %pow = tail call afn float @_Z3powff(float %x, float 0.5)591 ret float %pow592}593 594define float @test_pow_afn_f32_neg0.5(float %x) {595; CHECK-LABEL: define float @test_pow_afn_f32_neg0.5596; CHECK-SAME: (float [[X:%.*]]) {597; CHECK-NEXT: [[__POW2RSQRT:%.*]] = call afn float @_Z5rsqrtf(float [[X]])598; CHECK-NEXT: ret float [[__POW2RSQRT]]599;600 %pow = tail call afn float @_Z3powff(float %x, float -0.5)601 ret float %pow602}603 604define <2 x float> @test_pow_afn_v2f32_0.5(<2 x float> %x) {605; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_0.5606; CHECK-SAME: (<2 x float> [[X:%.*]]) {607; CHECK-NEXT: [[__POW2SQRT:%.*]] = call afn <2 x float> @_Z4sqrtDv2_f(<2 x float> [[X]])608; CHECK-NEXT: ret <2 x float> [[__POW2SQRT]]609;610 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 0.5, float 0.5>)611 ret <2 x float> %pow612}613 614define <2 x float> @test_pow_afn_v2f32_neg0.5(<2 x float> %x) {615; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_neg0.5616; CHECK-SAME: (<2 x float> [[X:%.*]]) {617; CHECK-NEXT: [[__POW2RSQRT:%.*]] = call afn <2 x float> @_Z5rsqrtDv2_f(<2 x float> [[X]])618; CHECK-NEXT: ret <2 x float> [[__POW2RSQRT]]619;620 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -0.5, float -0.5>)621 ret <2 x float> %pow622}623 624define <2 x float> @test_pow_afn_v2f32_plus_minus_0.5(<2 x float> %x) {625; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_plus_minus_0.5626; CHECK-SAME: (<2 x float> [[X:%.*]]) {627; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> <float 5.000000e-01, float -5.000000e-01>)628; CHECK-NEXT: ret <2 x float> [[POW]]629;630 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 0.5, float -0.5>)631 ret <2 x float> %pow632}633 634define <3 x float> @test_pow_afn_v3f32_0.5_splat_undef(<3 x float> %x, <3 x float> %y) {635; CHECK-LABEL: define <3 x float> @test_pow_afn_v3f32_0.5_splat_undef636; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {637; CHECK-NEXT: [[__POW2SQRT:%.*]] = call afn <3 x float> @_Z4sqrtDv3_f(<3 x float> [[X]])638; CHECK-NEXT: ret <3 x float> [[__POW2SQRT]]639;640 %pow = tail call afn <3 x float> @_Z3powDv3_fS_(<3 x float> %x, <3 x float> <float 0.5, float poison, float 0.5>)641 ret <3 x float> %pow642}643 644define <3 x float> @test_pow_afn_v3f32_neg0.5_splat_undef(<3 x float> %x, <3 x float> %y) {645; CHECK-LABEL: define <3 x float> @test_pow_afn_v3f32_neg0.5_splat_undef646; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {647; CHECK-NEXT: [[__POW2RSQRT:%.*]] = call afn <3 x float> @_Z5rsqrtDv3_f(<3 x float> [[X]])648; CHECK-NEXT: ret <3 x float> [[__POW2RSQRT]]649;650 %pow = tail call afn <3 x float> @_Z3powDv3_fS_(<3 x float> %x, <3 x float> <float -0.5, float poison, float -0.5>)651 ret <3 x float> %pow652}653 654define float @test_pow_afn_f32_1.0(float %x) {655; CHECK-LABEL: define float @test_pow_afn_f32_1.0656; CHECK-SAME: (float [[X:%.*]]) {657; CHECK-NEXT: ret float [[X]]658;659 %pow = tail call afn float @_Z3powff(float %x, float 1.0)660 ret float %pow661}662 663define float @test_pow_afn_f32_neg1.0(float %x) {664; CHECK-LABEL: define float @test_pow_afn_f32_neg1.0665; CHECK-SAME: (float [[X:%.*]]) {666; CHECK-NEXT: [[__POWRECIP:%.*]] = fdiv afn float 1.000000e+00, [[X]]667; CHECK-NEXT: ret float [[__POWRECIP]]668;669 %pow = tail call afn float @_Z3powff(float %x, float -1.0)670 ret float %pow671}672 673define <2 x float> @test_pow_afn_v2f32_1.0(<2 x float> %x) {674; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_1.0675; CHECK-SAME: (<2 x float> [[X:%.*]]) {676; CHECK-NEXT: ret <2 x float> [[X]]677;678 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 1.0, float 1.0>)679 ret <2 x float> %pow680}681 682define <2 x float> @test_pow_afn_v2f32_neg1.0(<2 x float> %x) {683; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_neg1.0684; CHECK-SAME: (<2 x float> [[X:%.*]]) {685; CHECK-NEXT: [[__POWRECIP:%.*]] = fdiv afn <2 x float> splat (float 1.000000e+00), [[X]]686; CHECK-NEXT: ret <2 x float> [[__POWRECIP]]687;688 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -1.0, float -1.0>)689 ret <2 x float> %pow690}691 692define <2 x float> @test_pow_afn_v2f32_plus_minus_1.0(<2 x float> %x) {693; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_plus_minus_1.0694; CHECK-SAME: (<2 x float> [[X:%.*]]) {695; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> <i32 1, i32 -1>)696; CHECK-NEXT: ret <2 x float> [[POW]]697;698 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 1.0, float -1.0>)699 ret <2 x float> %pow700}701 702define <3 x float> @test_pow_afn_v3f32_1.0_splat_undef(<3 x float> %x, <3 x float> %y) {703; CHECK-LABEL: define <3 x float> @test_pow_afn_v3f32_1.0_splat_undef704; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {705; CHECK-NEXT: ret <3 x float> [[X]]706;707 %pow = tail call afn <3 x float> @_Z3powDv3_fS_(<3 x float> %x, <3 x float> <float 1.0, float poison, float 1.0>)708 ret <3 x float> %pow709}710 711define <3 x float> @test_pow_afn_v3f32_neg1.0_splat_undef(<3 x float> %x, <3 x float> %y) {712; CHECK-LABEL: define <3 x float> @test_pow_afn_v3f32_neg1.0_splat_undef713; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {714; CHECK-NEXT: [[__POWRECIP:%.*]] = fdiv afn <3 x float> splat (float 1.000000e+00), [[X]]715; CHECK-NEXT: ret <3 x float> [[__POWRECIP]]716;717 %pow = tail call afn <3 x float> @_Z3powDv3_fS_(<3 x float> %x, <3 x float> <float -1.0, float poison, float -1.0>)718 ret <3 x float> %pow719}720 721define float @test_pow_afn_f32_2.0(float %x) {722; CHECK-LABEL: define float @test_pow_afn_f32_2.0723; CHECK-SAME: (float [[X:%.*]]) {724; CHECK-NEXT: [[__POW2:%.*]] = fmul afn float [[X]], [[X]]725; CHECK-NEXT: ret float [[__POW2]]726;727 %pow = tail call afn float @_Z3powff(float %x, float 2.0)728 ret float %pow729}730 731define float @test_pow_afn_f32_neg2.0(float %x) {732; CHECK-LABEL: define float @test_pow_afn_f32_neg2.0733; CHECK-SAME: (float [[X:%.*]]) {734; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 -2)735; CHECK-NEXT: ret float [[POW]]736;737 %pow = tail call afn float @_Z3powff(float %x, float -2.0)738 ret float %pow739}740 741define <2 x float> @test_pow_afn_v2f32_2.0(<2 x float> %x) {742; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_2.0743; CHECK-SAME: (<2 x float> [[X:%.*]]) {744; CHECK-NEXT: [[__POW2:%.*]] = fmul afn <2 x float> [[X]], [[X]]745; CHECK-NEXT: ret <2 x float> [[__POW2]]746;747 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 2.0, float 2.0>)748 ret <2 x float> %pow749}750 751define <2 x float> @test_pow_afn_v2f32_neg2.0(<2 x float> %x) {752; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_neg2.0753; CHECK-SAME: (<2 x float> [[X:%.*]]) {754; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> splat (i32 -2))755; CHECK-NEXT: ret <2 x float> [[POW]]756;757 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -2.0, float -2.0>)758 ret <2 x float> %pow759}760 761define <2 x float> @test_pow_afn_v2f32_plus_minus_2.0(<2 x float> %x) {762; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_plus_minus_2.0763; CHECK-SAME: (<2 x float> [[X:%.*]]) {764; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> <i32 2, i32 -2>)765; CHECK-NEXT: ret <2 x float> [[POW]]766;767 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 2.0, float -2.0>)768 ret <2 x float> %pow769}770 771define float @test_pow_afn_f32_3.0(float %x) {772; CHECK-LABEL: define float @test_pow_afn_f32_3.0773; CHECK-SAME: (float [[X:%.*]]) {774; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 3)775; CHECK-NEXT: ret float [[POW]]776;777 %pow = tail call afn float @_Z3powff(float %x, float 3.0)778 ret float %pow779}780 781define float @test_pow_afn_f32_neg3.0(float %x) {782; CHECK-LABEL: define float @test_pow_afn_f32_neg3.0783; CHECK-SAME: (float [[X:%.*]]) {784; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 -3)785; CHECK-NEXT: ret float [[POW]]786;787 %pow = tail call afn float @_Z3powff(float %x, float -3.0)788 ret float %pow789}790 791define <2 x float> @test_pow_afn_v2f32_3.0(<2 x float> %x) {792; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_3.0793; CHECK-SAME: (<2 x float> [[X:%.*]]) {794; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> splat (i32 3))795; CHECK-NEXT: ret <2 x float> [[POW]]796;797 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 3.0, float 3.0>)798 ret <2 x float> %pow799}800 801define <2 x float> @test_pow_afn_v2f32_neg3.0(<2 x float> %x) {802; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_neg3.0803; CHECK-SAME: (<2 x float> [[X:%.*]]) {804; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> splat (i32 -3))805; CHECK-NEXT: ret <2 x float> [[POW]]806;807 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -3.0, float -3.0>)808 ret <2 x float> %pow809}810 811define <2 x float> @test_pow_afn_v2f32_plus_minus_3.0(<2 x float> %x) {812; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_plus_minus_3.0813; CHECK-SAME: (<2 x float> [[X:%.*]]) {814; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> <i32 3, i32 -3>)815; CHECK-NEXT: ret <2 x float> [[POW]]816;817 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 3.0, float -3.0>)818 ret <2 x float> %pow819}820 821define float @test_pow_afn_f32_3.99(float %x) {822; CHECK-LABEL: define float @test_pow_afn_f32_3.99823; CHECK-SAME: (float [[X:%.*]]) {824; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z3powff(float [[X]], float 0x400FEB8520000000)825; CHECK-NEXT: ret float [[POW]]826;827 %pow = tail call afn float @_Z3powff(float %x, float 0x400FEB8520000000)828 ret float %pow829}830 831define float @test_pow_afn_f32_neg3.99(float %x) {832; CHECK-LABEL: define float @test_pow_afn_f32_neg3.99833; CHECK-SAME: (float [[X:%.*]]) {834; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z3powff(float [[X]], float 0xC00FEB8520000000)835; CHECK-NEXT: ret float [[POW]]836;837 %pow = tail call afn float @_Z3powff(float %x, float 0xC00FEB8520000000)838 ret float %pow839}840 841define <2 x float> @test_pow_afn_v2f32_3.99(<2 x float> %x) {842; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_3.99843; CHECK-SAME: (<2 x float> [[X:%.*]]) {844; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> splat (float 0x400FEB8520000000))845; CHECK-NEXT: ret <2 x float> [[POW]]846;847 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 0x400FEB8520000000, float 0x400FEB8520000000>)848 ret <2 x float> %pow849}850 851define <2 x float> @test_pow_afn_v2f32_neg3.99(<2 x float> %x) {852; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_neg3.99853; CHECK-SAME: (<2 x float> [[X:%.*]]) {854; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> splat (float 0xC00FEB8520000000))855; CHECK-NEXT: ret <2 x float> [[POW]]856;857 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 0xC00FEB8520000000, float 0xC00FEB8520000000>)858 ret <2 x float> %pow859}860 861define <2 x float> @test_pow_afn_v2f32_plus_minus_3.99(<2 x float> %x) {862; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_plus_minus_3.99863; CHECK-SAME: (<2 x float> [[X:%.*]]) {864; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> <float 0x400FEB8520000000, float 0xC00FEB8520000000>)865; CHECK-NEXT: ret <2 x float> [[POW]]866;867 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 0x400FEB8520000000, float 0xC00FEB8520000000>)868 ret <2 x float> %pow869}870 871define float @test_pow_afn_f32_8.0(float %x) {872; CHECK-LABEL: define float @test_pow_afn_f32_8.0873; CHECK-SAME: (float [[X:%.*]]) {874; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 8)875; CHECK-NEXT: ret float [[POW]]876;877 %pow = tail call afn float @_Z3powff(float %x, float 8.0)878 ret float %pow879}880 881define float @test_pow_afn_f32_neg8.0(float %x) {882; CHECK-LABEL: define float @test_pow_afn_f32_neg8.0883; CHECK-SAME: (float [[X:%.*]]) {884; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 -8)885; CHECK-NEXT: ret float [[POW]]886;887 %pow = tail call afn float @_Z3powff(float %x, float -8.0)888 ret float %pow889}890 891define <2 x float> @test_pow_afn_v2f32_8.0(<2 x float> %x) {892; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_8.0893; CHECK-SAME: (<2 x float> [[X:%.*]]) {894; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> splat (i32 8))895; CHECK-NEXT: ret <2 x float> [[POW]]896;897 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 8.0, float 8.0>)898 ret <2 x float> %pow899}900 901define <2 x float> @test_pow_afn_v2f32_neg8.0(<2 x float> %x) {902; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_neg8.0903; CHECK-SAME: (<2 x float> [[X:%.*]]) {904; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> splat (i32 -8))905; CHECK-NEXT: ret <2 x float> [[POW]]906;907 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -8.0, float -8.0>)908 ret <2 x float> %pow909}910 911define <2 x float> @test_pow_afn_v2f32_plus_minus_8.0(<2 x float> %x) {912; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_plus_minus_8.0913; CHECK-SAME: (<2 x float> [[X:%.*]]) {914; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> <i32 8, i32 -8>)915; CHECK-NEXT: ret <2 x float> [[POW]]916;917 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 8.0, float -8.0>)918 ret <2 x float> %pow919}920 921define float @test_pow_afn_f32_12.0(float %x) {922; CHECK-LABEL: define float @test_pow_afn_f32_12.0923; CHECK-SAME: (float [[X:%.*]]) {924; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 12)925; CHECK-NEXT: ret float [[POW]]926;927 %pow = tail call afn float @_Z3powff(float %x, float 12.0)928 ret float %pow929}930 931define float @test_pow_afn_f32_neg12.0(float %x) {932; CHECK-LABEL: define float @test_pow_afn_f32_neg12.0933; CHECK-SAME: (float [[X:%.*]]) {934; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 -12)935; CHECK-NEXT: ret float [[POW]]936;937 %pow = tail call afn float @_Z3powff(float %x, float -12.0)938 ret float %pow939}940 941define <2 x float> @test_pow_afn_v2f32_12.0(<2 x float> %x) {942; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_12.0943; CHECK-SAME: (<2 x float> [[X:%.*]]) {944; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> splat (i32 12))945; CHECK-NEXT: ret <2 x float> [[POW]]946;947 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 12.0, float 12.0>)948 ret <2 x float> %pow949}950 951define <2 x float> @test_pow_afn_v2f32_neg12.0(<2 x float> %x) {952; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_neg12.0953; CHECK-SAME: (<2 x float> [[X:%.*]]) {954; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> splat (i32 -12))955; CHECK-NEXT: ret <2 x float> [[POW]]956;957 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -12.0, float -12.0>)958 ret <2 x float> %pow959}960 961define <2 x float> @test_pow_afn_v2f32_plus_minus_12.0(<2 x float> %x) {962; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_plus_minus_12.0963; CHECK-SAME: (<2 x float> [[X:%.*]]) {964; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> <i32 12, i32 -12>)965; CHECK-NEXT: ret <2 x float> [[POW]]966;967 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 12.0, float -12.0>)968 ret <2 x float> %pow969}970 971define float @test_pow_afn_f32_13.0(float %x) {972; CHECK-LABEL: define float @test_pow_afn_f32_13.0973; CHECK-SAME: (float [[X:%.*]]) {974; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 13)975; CHECK-NEXT: ret float [[POW]]976;977 %pow = tail call afn float @_Z3powff(float %x, float 13.0)978 ret float %pow979}980 981define float @test_pow_afn_f32_neg13.0(float %x) {982; CHECK-LABEL: define float @test_pow_afn_f32_neg13.0983; CHECK-SAME: (float [[X:%.*]]) {984; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 -13)985; CHECK-NEXT: ret float [[POW]]986;987 %pow = tail call afn float @_Z3powff(float %x, float -13.0)988 ret float %pow989}990 991define <2 x float> @test_pow_afn_v2f32_13.0(<2 x float> %x) {992; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_13.0993; CHECK-SAME: (<2 x float> [[X:%.*]]) {994; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> splat (i32 13))995; CHECK-NEXT: ret <2 x float> [[POW]]996;997 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 13.0, float 13.0>)998 ret <2 x float> %pow999}1000 1001define <2 x float> @test_pow_afn_v2f32_neg13.0(<2 x float> %x) {1002; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_neg13.01003; CHECK-SAME: (<2 x float> [[X:%.*]]) {1004; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> splat (i32 -13))1005; CHECK-NEXT: ret <2 x float> [[POW]]1006;1007 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -13.0, float -13.0>)1008 ret <2 x float> %pow1009}1010 1011define <2 x float> @test_pow_afn_v2f32_13.0_15.0(<2 x float> %x) {1012; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_13.0_15.01013; CHECK-SAME: (<2 x float> [[X:%.*]]) {1014; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> <i32 13, i32 15>)1015; CHECK-NEXT: ret <2 x float> [[POW]]1016;1017 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 13.0, float 15.0>)1018 ret <2 x float> %pow1019}1020 1021define <2 x float> @test_pow_afn_v2f32_13.0_14.0(<2 x float> %x) {1022; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_13.0_14.01023; CHECK-SAME: (<2 x float> [[X:%.*]]) {1024; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> <i32 13, i32 14>)1025; CHECK-NEXT: ret <2 x float> [[POW]]1026;1027 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 13.0, float 14.0>)1028 ret <2 x float> %pow1029}1030 1031define <2 x float> @test_pow_afn_v2f32_14.0_16.0(<2 x float> %x) {1032; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_14.0_16.01033; CHECK-SAME: (<2 x float> [[X:%.*]]) {1034; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> <i32 14, i32 16>)1035; CHECK-NEXT: ret <2 x float> [[POW]]1036;1037 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 14.0, float 16.0>)1038 ret <2 x float> %pow1039}1040 1041define <2 x float> @test_pow_afn_v2f32_plus_minus_13.0(<2 x float> %x) {1042; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_plus_minus_13.01043; CHECK-SAME: (<2 x float> [[X:%.*]]) {1044; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> <i32 13, i32 -13>)1045; CHECK-NEXT: ret <2 x float> [[POW]]1046;1047 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 13.0, float -13.0>)1048 ret <2 x float> %pow1049}1050 1051define <2 x float> @test_pow_afn_v2f32_plus_minus_13.0_minus_14.0(<2 x float> %x) {1052; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_plus_minus_13.0_minus_14.01053; CHECK-SAME: (<2 x float> [[X:%.*]]) {1054; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> <i32 -13, i32 -14>)1055; CHECK-NEXT: ret <2 x float> [[POW]]1056;1057 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -13.0, float -14.0>)1058 ret <2 x float> %pow1059}1060 1061define float @test_pow_afn_f32_nnan_x_known_positive(float nofpclass(ninf nnorm nsub) %x, float %y) {1062; CHECK-LABEL: define float @test_pow_afn_f32_nnan_x_known_positive1063; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]], float [[Y:%.*]]) {1064; CHECK-NEXT: [[POW:%.*]] = tail call nnan afn float @_Z4powrff(float [[X]], float [[Y]])1065; CHECK-NEXT: ret float [[POW]]1066;1067 %pow = tail call afn nnan float @_Z3powff(float %x, float %y)1068 ret float %pow1069}1070 1071define float @test_pow_afn_f32_nnan_ninf_x_known_positive(float nofpclass(ninf nnorm nsub) %x, float %y) {1072; CHECK-LABEL: define float @test_pow_afn_f32_nnan_ninf_x_known_positive1073; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]], float [[Y:%.*]]) {1074; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn float @llvm.log2.f32(float [[X]])1075; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn float [[Y]], [[__LOG2]]1076; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn float @llvm.exp2.f32(float [[__YLOGX]])1077; CHECK-NEXT: ret float [[__EXP2]]1078;1079 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float %y)1080 ret float %pow1081}1082 1083define <2 x float> @test_pow_afn_v2f32_nnan_x_known_positive(<2 x float> nofpclass(ninf nnorm nsub) %x, <2 x float> %y) {1084; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_nnan_x_known_positive1085; CHECK-SAME: (<2 x float> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x float> [[Y:%.*]]) {1086; CHECK-NEXT: [[POW:%.*]] = tail call nnan afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> [[Y]])1087; CHECK-NEXT: ret <2 x float> [[POW]]1088;1089 %pow = tail call afn nnan <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> %y)1090 ret <2 x float> %pow1091}1092 1093define <2 x float> @test_pow_afn_v2f32_nnan_ninf_x_known_positive(<2 x float> nofpclass(ninf nnorm nsub) %x, <2 x float> %y) {1094; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_nnan_ninf_x_known_positive1095; CHECK-SAME: (<2 x float> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x float> [[Y:%.*]]) {1096; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn <2 x float> @llvm.log2.v2f32(<2 x float> [[X]])1097; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn <2 x float> [[Y]], [[__LOG2]]1098; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn <2 x float> @llvm.exp2.v2f32(<2 x float> [[__YLOGX]])1099; CHECK-NEXT: ret <2 x float> [[__EXP2]]1100;1101 %pow = tail call afn nnan ninf <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> %y)1102 ret <2 x float> %pow1103}1104 1105define float @test_pow_f32_x_known_positive(float nofpclass(ninf nnorm nsub) %x, float %y) {1106; CHECK-LABEL: define float @test_pow_f32_x_known_positive1107; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]], float [[Y:%.*]]) {1108; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4powrff(float [[X]], float [[Y]])1109; CHECK-NEXT: ret float [[POW]]1110;1111 %pow = tail call float @_Z3powff(float %x, float %y)1112 ret float %pow1113}1114 1115define float @test_pow_afn_f32_x_known_positive(float nofpclass(ninf nnorm nsub) %x, float %y) {1116; CHECK-LABEL: define float @test_pow_afn_f32_x_known_positive1117; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]], float [[Y:%.*]]) {1118; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4powrff(float [[X]], float [[Y]])1119; CHECK-NEXT: ret float [[POW]]1120;1121 %pow = tail call afn float @_Z3powff(float %x, float %y)1122 ret float %pow1123}1124 1125define <2 x float> @test_pow_v2f32_x_known_positive(<2 x float> nofpclass(ninf nnorm nsub) %x, <2 x float> %y) {1126; CHECK-LABEL: define <2 x float> @test_pow_v2f32_x_known_positive1127; CHECK-SAME: (<2 x float> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x float> [[Y:%.*]]) {1128; CHECK-NEXT: [[POW:%.*]] = tail call <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> [[Y]])1129; CHECK-NEXT: ret <2 x float> [[POW]]1130;1131 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> %y)1132 ret <2 x float> %pow1133}1134 1135define <2 x float> @test_pow_afn_v2f32_x_known_positive(<2 x float> nofpclass(ninf nnorm nsub) %x, <2 x float> %y) {1136; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_x_known_positive1137; CHECK-SAME: (<2 x float> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x float> [[Y:%.*]]) {1138; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> [[Y]])1139; CHECK-NEXT: ret <2 x float> [[POW]]1140;1141 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> %y)1142 ret <2 x float> %pow1143}1144 1145define double @test_pow_afn_f64_nnan_x_known_positive(double nofpclass(ninf nnorm nsub) %x, double %y) {1146; CHECK-LABEL: define double @test_pow_afn_f64_nnan_x_known_positive1147; CHECK-SAME: (double nofpclass(ninf nsub nnorm) [[X:%.*]], double [[Y:%.*]]) {1148; CHECK-NEXT: [[POW:%.*]] = tail call nnan afn double @_Z4powrdd(double [[X]], double [[Y]])1149; CHECK-NEXT: ret double [[POW]]1150;1151 %pow = tail call afn nnan double @_Z3powdd(double %x, double %y)1152 ret double %pow1153}1154 1155define double @test_pow_afn_f64_nnan_ninf_x_known_positive(double nofpclass(ninf nnorm nsub) %x, double %y) {1156; CHECK-LABEL: define double @test_pow_afn_f64_nnan_ninf_x_known_positive1157; CHECK-SAME: (double nofpclass(ninf nsub nnorm) [[X:%.*]], double [[Y:%.*]]) {1158; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn double @_Z4log2d(double [[X]])1159; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn double [[Y]], [[__LOG2]]1160; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn double @_Z4exp2d(double [[__YLOGX]])1161; CHECK-NEXT: ret double [[__EXP2]]1162;1163 %pow = tail call afn nnan ninf double @_Z3powdd(double %x, double %y)1164 ret double %pow1165}1166 1167define <2 x double> @test_pow_afn_v2f64_nnan_x_known_positive(<2 x double> nofpclass(ninf nnorm nsub) %x, <2 x double> %y) {1168; CHECK-LABEL: define <2 x double> @test_pow_afn_v2f64_nnan_x_known_positive1169; CHECK-SAME: (<2 x double> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x double> [[Y:%.*]]) {1170; CHECK-NEXT: [[POW:%.*]] = tail call nnan afn <2 x double> @_Z4powrDv2_dS_(<2 x double> [[X]], <2 x double> [[Y]])1171; CHECK-NEXT: ret <2 x double> [[POW]]1172;1173 %pow = tail call afn nnan <2 x double> @_Z3powDv2_dS_(<2 x double> %x, <2 x double> %y)1174 ret <2 x double> %pow1175}1176 1177define <2 x double> @test_pow_afn_v2f64_nnan_ninf_x_known_positive(<2 x double> nofpclass(ninf nnorm nsub) %x, <2 x double> %y) {1178; CHECK-LABEL: define <2 x double> @test_pow_afn_v2f64_nnan_ninf_x_known_positive1179; CHECK-SAME: (<2 x double> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x double> [[Y:%.*]]) {1180; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn <2 x double> @_Z4log2Dv2_d(<2 x double> [[X]])1181; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn <2 x double> [[Y]], [[__LOG2]]1182; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn <2 x double> @_Z4exp2Dv2_d(<2 x double> [[__YLOGX]])1183; CHECK-NEXT: ret <2 x double> [[__EXP2]]1184;1185 %pow = tail call afn nnan ninf <2 x double> @_Z3powDv2_dS_(<2 x double> %x, <2 x double> %y)1186 ret <2 x double> %pow1187}1188 1189define double @test_pow_f64_x_known_positive(double nofpclass(ninf nnorm nsub) %x, double %y) {1190; CHECK-LABEL: define double @test_pow_f64_x_known_positive1191; CHECK-SAME: (double nofpclass(ninf nsub nnorm) [[X:%.*]], double [[Y:%.*]]) {1192; CHECK-NEXT: [[POW:%.*]] = tail call double @_Z4powrdd(double [[X]], double [[Y]])1193; CHECK-NEXT: ret double [[POW]]1194;1195 %pow = tail call double @_Z3powdd(double %x, double %y)1196 ret double %pow1197}1198 1199define double @test_pow_afn_f64_x_known_positive(double nofpclass(ninf nnorm nsub) %x, double %y) {1200; CHECK-LABEL: define double @test_pow_afn_f64_x_known_positive1201; CHECK-SAME: (double nofpclass(ninf nsub nnorm) [[X:%.*]], double [[Y:%.*]]) {1202; CHECK-NEXT: [[POW:%.*]] = tail call afn double @_Z4powrdd(double [[X]], double [[Y]])1203; CHECK-NEXT: ret double [[POW]]1204;1205 %pow = tail call afn double @_Z3powdd(double %x, double %y)1206 ret double %pow1207}1208 1209define <2 x double> @test_pow_v2f64_x_known_positive(<2 x double> nofpclass(ninf nnorm nsub) %x, <2 x double> %y) {1210; CHECK-LABEL: define <2 x double> @test_pow_v2f64_x_known_positive1211; CHECK-SAME: (<2 x double> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x double> [[Y:%.*]]) {1212; CHECK-NEXT: [[POW:%.*]] = tail call <2 x double> @_Z4powrDv2_dS_(<2 x double> [[X]], <2 x double> [[Y]])1213; CHECK-NEXT: ret <2 x double> [[POW]]1214;1215 %pow = tail call <2 x double> @_Z3powDv2_dS_(<2 x double> %x, <2 x double> %y)1216 ret <2 x double> %pow1217}1218 1219define <2 x double> @test_pow_afn_v2f64_x_known_positive(<2 x double> nofpclass(ninf nnorm nsub) %x, <2 x double> %y) {1220; CHECK-LABEL: define <2 x double> @test_pow_afn_v2f64_x_known_positive1221; CHECK-SAME: (<2 x double> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x double> [[Y:%.*]]) {1222; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x double> @_Z4powrDv2_dS_(<2 x double> [[X]], <2 x double> [[Y]])1223; CHECK-NEXT: ret <2 x double> [[POW]]1224;1225 %pow = tail call afn <2 x double> @_Z3powDv2_dS_(<2 x double> %x, <2 x double> %y)1226 ret <2 x double> %pow1227}1228 1229define half @test_pow_afn_f16_nnan_x_known_positive(half nofpclass(ninf nnorm nsub) %x, half %y) {1230; CHECK-LABEL: define half @test_pow_afn_f16_nnan_x_known_positive1231; CHECK-SAME: (half nofpclass(ninf nsub nnorm) [[X:%.*]], half [[Y:%.*]]) {1232; CHECK-NEXT: [[POW:%.*]] = tail call nnan afn half @_Z4powrDhDh(half [[X]], half [[Y]])1233; CHECK-NEXT: ret half [[POW]]1234;1235 %pow = tail call afn nnan half @_Z3powDhDh(half %x, half %y)1236 ret half %pow1237}1238 1239define half @test_pow_afn_f16_nnan_ninf_x_known_positive(half nofpclass(ninf nnorm nsub) %x, half %y) {1240; CHECK-LABEL: define half @test_pow_afn_f16_nnan_ninf_x_known_positive1241; CHECK-SAME: (half nofpclass(ninf nsub nnorm) [[X:%.*]], half [[Y:%.*]]) {1242; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn half @llvm.log2.f16(half [[X]])1243; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn half [[Y]], [[__LOG2]]1244; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn half @llvm.exp2.f16(half [[__YLOGX]])1245; CHECK-NEXT: ret half [[__EXP2]]1246;1247 %pow = tail call afn nnan ninf half @_Z3powDhDh(half %x, half %y)1248 ret half %pow1249}1250 1251define <2 x half> @test_pow_afn_v2f16_nnan_x_known_positive(<2 x half> nofpclass(ninf nnorm nsub) %x, <2 x half> %y) {1252; CHECK-LABEL: define <2 x half> @test_pow_afn_v2f16_nnan_x_known_positive1253; CHECK-SAME: (<2 x half> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x half> [[Y:%.*]]) {1254; CHECK-NEXT: [[POW:%.*]] = tail call nnan afn <2 x half> @_Z4powrDv2_DhS_(<2 x half> [[X]], <2 x half> [[Y]])1255; CHECK-NEXT: ret <2 x half> [[POW]]1256;1257 %pow = tail call afn nnan <2 x half> @_Z3powDv2_DhS_(<2 x half> %x, <2 x half> %y)1258 ret <2 x half> %pow1259}1260 1261define <2 x half> @test_pow_afn_v2f16_nnan_ninf_x_known_positive(<2 x half> nofpclass(ninf nnorm nsub) %x, <2 x half> %y) {1262; CHECK-LABEL: define <2 x half> @test_pow_afn_v2f16_nnan_ninf_x_known_positive1263; CHECK-SAME: (<2 x half> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x half> [[Y:%.*]]) {1264; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn <2 x half> @llvm.log2.v2f16(<2 x half> [[X]])1265; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn <2 x half> [[Y]], [[__LOG2]]1266; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn <2 x half> @llvm.exp2.v2f16(<2 x half> [[__YLOGX]])1267; CHECK-NEXT: ret <2 x half> [[__EXP2]]1268;1269 %pow = tail call afn nnan ninf <2 x half> @_Z3powDv2_DhS_(<2 x half> %x, <2 x half> %y)1270 ret <2 x half> %pow1271}1272 1273define half @test_pow_f16_x_known_positive(half nofpclass(ninf nnorm nsub) %x, half %y) {1274; CHECK-LABEL: define half @test_pow_f16_x_known_positive1275; CHECK-SAME: (half nofpclass(ninf nsub nnorm) [[X:%.*]], half [[Y:%.*]]) {1276; CHECK-NEXT: [[POW:%.*]] = tail call half @_Z4powrDhDh(half [[X]], half [[Y]])1277; CHECK-NEXT: ret half [[POW]]1278;1279 %pow = tail call half @_Z3powDhDh(half %x, half %y)1280 ret half %pow1281}1282 1283define half @test_pow_afn_f16_x_known_positive(half nofpclass(ninf nnorm nsub) %x, half %y) {1284; CHECK-LABEL: define half @test_pow_afn_f16_x_known_positive1285; CHECK-SAME: (half nofpclass(ninf nsub nnorm) [[X:%.*]], half [[Y:%.*]]) {1286; CHECK-NEXT: [[POW:%.*]] = tail call afn half @_Z4powrDhDh(half [[X]], half [[Y]])1287; CHECK-NEXT: ret half [[POW]]1288;1289 %pow = tail call afn half @_Z3powDhDh(half %x, half %y)1290 ret half %pow1291}1292 1293define <2 x half> @test_pow_v2f16_x_known_positive(<2 x half> nofpclass(ninf nnorm nsub) %x, <2 x half> %y) {1294; CHECK-LABEL: define <2 x half> @test_pow_v2f16_x_known_positive1295; CHECK-SAME: (<2 x half> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x half> [[Y:%.*]]) {1296; CHECK-NEXT: [[POW:%.*]] = tail call <2 x half> @_Z4powrDv2_DhS_(<2 x half> [[X]], <2 x half> [[Y]])1297; CHECK-NEXT: ret <2 x half> [[POW]]1298;1299 %pow = tail call <2 x half> @_Z3powDv2_DhS_(<2 x half> %x, <2 x half> %y)1300 ret <2 x half> %pow1301}1302 1303define <2 x half> @test_pow_afn_v2f16_x_known_positive(<2 x half> nofpclass(ninf nnorm nsub) %x, <2 x half> %y) {1304; CHECK-LABEL: define <2 x half> @test_pow_afn_v2f16_x_known_positive1305; CHECK-SAME: (<2 x half> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x half> [[Y:%.*]]) {1306; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x half> @_Z4powrDv2_DhS_(<2 x half> [[X]], <2 x half> [[Y]])1307; CHECK-NEXT: ret <2 x half> [[POW]]1308;1309 %pow = tail call afn <2 x half> @_Z3powDv2_DhS_(<2 x half> %x, <2 x half> %y)1310 ret <2 x half> %pow1311}1312 1313define float @test_pow_f32__y_0(float %x) {1314; CHECK-LABEL: define float @test_pow_f32__y_01315; CHECK-SAME: (float [[X:%.*]]) {1316; CHECK-NEXT: ret float 1.000000e+001317;1318 %pow = tail call float @_Z3powff(float %x, float 0.0)1319 ret float %pow1320}1321 1322define float @test_pow_f32__y_n0(float %x) {1323; CHECK-LABEL: define float @test_pow_f32__y_n01324; CHECK-SAME: (float [[X:%.*]]) {1325; CHECK-NEXT: ret float 1.000000e+001326;1327 %pow = tail call float @_Z3powff(float %x, float -0.0)1328 ret float %pow1329}1330 1331define float @test_pow_f32__y_1(float %x) {1332; CHECK-LABEL: define float @test_pow_f32__y_11333; CHECK-SAME: (float [[X:%.*]]) {1334; CHECK-NEXT: ret float [[X]]1335;1336 %pow = tail call float @_Z3powff(float %x, float 1.0)1337 ret float %pow1338}1339 1340define float @test_pow_f32__y_n1(float %x) {1341; CHECK-LABEL: define float @test_pow_f32__y_n11342; CHECK-SAME: (float [[X:%.*]]) {1343; CHECK-NEXT: [[__POWRECIP:%.*]] = fdiv float 1.000000e+00, [[X]]1344; CHECK-NEXT: ret float [[__POWRECIP]]1345;1346 %pow = tail call float @_Z3powff(float %x, float -1.0)1347 ret float %pow1348}1349 1350define float @test_pow_f32__y_2(float %x) {1351; CHECK-LABEL: define float @test_pow_f32__y_21352; CHECK-SAME: (float [[X:%.*]]) {1353; CHECK-NEXT: [[__POW2:%.*]] = fmul float [[X]], [[X]]1354; CHECK-NEXT: ret float [[__POW2]]1355;1356 %pow = tail call float @_Z3powff(float %x, float 2.0)1357 ret float %pow1358}1359 1360define float @test_pow_f32__y_n2(float %x) {1361; CHECK-LABEL: define float @test_pow_f32__y_n21362; CHECK-SAME: (float [[X:%.*]]) {1363; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 -2)1364; CHECK-NEXT: ret float [[POW]]1365;1366 %pow = tail call float @_Z3powff(float %x, float -2.0)1367 ret float %pow1368}1369 1370define float @test_pow_f32__y_half(float %x) {1371; CHECK-LABEL: define float @test_pow_f32__y_half1372; CHECK-SAME: (float [[X:%.*]]) {1373; CHECK-NEXT: [[__POW2SQRT:%.*]] = call float @_Z4sqrtf(float [[X]])1374; CHECK-NEXT: ret float [[__POW2SQRT]]1375;1376 %pow = tail call float @_Z3powff(float %x, float 0.5)1377 ret float %pow1378}1379 1380define float @test_pow_f32__y_neg_half(float %x) {1381; CHECK-LABEL: define float @test_pow_f32__y_neg_half1382; CHECK-SAME: (float [[X:%.*]]) {1383; CHECK-NEXT: [[__POW2RSQRT:%.*]] = call float @_Z5rsqrtf(float [[X]])1384; CHECK-NEXT: ret float [[__POW2RSQRT]]1385;1386 %pow = tail call float @_Z3powff(float %x, float -0.5)1387 ret float %pow1388}1389 1390define float @test_pow_f32__y_3(float %x) {1391; CHECK-LABEL: define float @test_pow_f32__y_31392; CHECK-SAME: (float [[X:%.*]]) {1393; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 3)1394; CHECK-NEXT: ret float [[POW]]1395;1396 %pow = tail call float @_Z3powff(float %x, float 3.0)1397 ret float %pow1398}1399 1400define float @test_pow_f32__y_n3(float %x) {1401; CHECK-LABEL: define float @test_pow_f32__y_n31402; CHECK-SAME: (float [[X:%.*]]) {1403; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 -3)1404; CHECK-NEXT: ret float [[POW]]1405;1406 %pow = tail call float @_Z3powff(float %x, float -3.0)1407 ret float %pow1408}1409 1410define float @test_pow_f32__y_2_5(float %x) {1411; CHECK-LABEL: define float @test_pow_f32__y_2_51412; CHECK-SAME: (float [[X:%.*]]) {1413; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z3powff(float [[X]], float 2.500000e+00)1414; CHECK-NEXT: ret float [[POW]]1415;1416 %pow = tail call float @_Z3powff(float %x, float 2.5)1417 ret float %pow1418}1419 1420define float @test_pow_f32__y_n_2_5(float %x) {1421; CHECK-LABEL: define float @test_pow_f32__y_n_2_51422; CHECK-SAME: (float [[X:%.*]]) {1423; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z3powff(float [[X]], float -2.500000e+00)1424; CHECK-NEXT: ret float [[POW]]1425;1426 %pow = tail call float @_Z3powff(float %x, float -2.5)1427 ret float %pow1428}1429 1430define <2 x float> @test_pow_v2f32__y_0(<2 x float> %x) {1431; CHECK-LABEL: define <2 x float> @test_pow_v2f32__y_01432; CHECK-SAME: (<2 x float> [[X:%.*]]) {1433; CHECK-NEXT: ret <2 x float> splat (float 1.000000e+00)1434;1435 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> zeroinitializer)1436 ret <2 x float> %pow1437}1438 1439define <2 x float> @test_pow_v2f32__y_n0(<2 x float> %x) {1440; CHECK-LABEL: define <2 x float> @test_pow_v2f32__y_n01441; CHECK-SAME: (<2 x float> [[X:%.*]]) {1442; CHECK-NEXT: ret <2 x float> splat (float 1.000000e+00)1443;1444 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -0.0, float -0.0>)1445 ret <2 x float> %pow1446}1447 1448define <2 x float> @test_pow_v2f32__y_1(<2 x float> %x) {1449; CHECK-LABEL: define <2 x float> @test_pow_v2f32__y_11450; CHECK-SAME: (<2 x float> [[X:%.*]]) {1451; CHECK-NEXT: ret <2 x float> [[X]]1452;1453 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 1.0,float 1.0>)1454 ret <2 x float> %pow1455}1456 1457define <2 x float> @test_pow_v2f32__y_n1(<2 x float> %x) {1458; CHECK-LABEL: define <2 x float> @test_pow_v2f32__y_n11459; CHECK-SAME: (<2 x float> [[X:%.*]]) {1460; CHECK-NEXT: [[__POWRECIP:%.*]] = fdiv <2 x float> splat (float 1.000000e+00), [[X]]1461; CHECK-NEXT: ret <2 x float> [[__POWRECIP]]1462;1463 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -1.0, float -1.0>)1464 ret <2 x float> %pow1465}1466 1467define <2 x float> @test_pow_v2f32__y_2(<2 x float> %x) {1468; CHECK-LABEL: define <2 x float> @test_pow_v2f32__y_21469; CHECK-SAME: (<2 x float> [[X:%.*]]) {1470; CHECK-NEXT: [[__POW2:%.*]] = fmul <2 x float> [[X]], [[X]]1471; CHECK-NEXT: ret <2 x float> [[__POW2]]1472;1473 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 2.0, float 2.0>)1474 ret <2 x float> %pow1475}1476 1477define <2 x float> @test_pow_v2f32__y_n2(<2 x float> %x) {1478; CHECK-LABEL: define <2 x float> @test_pow_v2f32__y_n21479; CHECK-SAME: (<2 x float> [[X:%.*]]) {1480; CHECK-NEXT: [[POW:%.*]] = tail call <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> splat (i32 -2))1481; CHECK-NEXT: ret <2 x float> [[POW]]1482;1483 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -2.0, float -2.0>)1484 ret <2 x float> %pow1485}1486 1487define <2 x float> @test_pow_v2f32__y_half(<2 x float> %x) {1488; CHECK-LABEL: define <2 x float> @test_pow_v2f32__y_half1489; CHECK-SAME: (<2 x float> [[X:%.*]]) {1490; CHECK-NEXT: [[__POW2SQRT:%.*]] = call <2 x float> @_Z4sqrtDv2_f(<2 x float> [[X]])1491; CHECK-NEXT: ret <2 x float> [[__POW2SQRT]]1492;1493 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 0.5, float 0.5>)1494 ret <2 x float> %pow1495}1496 1497define <2 x float> @test_pow_v2f32__y_neg_half(<2 x float> %x) {1498; CHECK-LABEL: define <2 x float> @test_pow_v2f32__y_neg_half1499; CHECK-SAME: (<2 x float> [[X:%.*]]) {1500; CHECK-NEXT: [[__POW2RSQRT:%.*]] = call <2 x float> @_Z5rsqrtDv2_f(<2 x float> [[X]])1501; CHECK-NEXT: ret <2 x float> [[__POW2RSQRT]]1502;1503 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -0.5, float -0.5>)1504 ret <2 x float> %pow1505}1506 1507define <2 x float> @test_pow_v2f32__y_3(<2 x float> %x) {1508; CHECK-LABEL: define <2 x float> @test_pow_v2f32__y_31509; CHECK-SAME: (<2 x float> [[X:%.*]]) {1510; CHECK-NEXT: [[POW:%.*]] = tail call <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> splat (i32 3))1511; CHECK-NEXT: ret <2 x float> [[POW]]1512;1513 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 3.0, float 3.0>)1514 ret <2 x float> %pow1515}1516 1517define <2 x float> @test_pow_v2f32__y_n3(<2 x float> %x) {1518; CHECK-LABEL: define <2 x float> @test_pow_v2f32__y_n31519; CHECK-SAME: (<2 x float> [[X:%.*]]) {1520; CHECK-NEXT: [[POW:%.*]] = tail call <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> splat (i32 -3))1521; CHECK-NEXT: ret <2 x float> [[POW]]1522;1523 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -3.0,float -3.0>)1524 ret <2 x float> %pow1525}1526 1527define <2 x float> @test_pow_v2f32__y_2_5(<2 x float> %x) {1528; CHECK-LABEL: define <2 x float> @test_pow_v2f32__y_2_51529; CHECK-SAME: (<2 x float> [[X:%.*]]) {1530; CHECK-NEXT: [[POW:%.*]] = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> splat (float 2.500000e+00))1531; CHECK-NEXT: ret <2 x float> [[POW]]1532;1533 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 2.5, float 2.5>)1534 ret <2 x float> %pow1535}1536 1537define <2 x float> @test_pow_v2f32__y_n_2_5(<2 x float> %x) {1538; CHECK-LABEL: define <2 x float> @test_pow_v2f32__y_n_2_51539; CHECK-SAME: (<2 x float> [[X:%.*]]) {1540; CHECK-NEXT: [[POW:%.*]] = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> splat (float -2.500000e+00))1541; CHECK-NEXT: ret <2 x float> [[POW]]1542;1543 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float -2.5, float -2.5>)1544 ret <2 x float> %pow1545}1546 1547define float @test_pow_f32__known_positive__y_0(float nofpclass(ninf nnorm nsub) %x) {1548; CHECK-LABEL: define float @test_pow_f32__known_positive__y_01549; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]]) {1550; CHECK-NEXT: ret float 1.000000e+001551;1552 %pow = tail call float @_Z3powff(float %x, float 0.0)1553 ret float %pow1554}1555 1556define float @test_pow_f32__known_positive__y_1(float nofpclass(ninf nnorm nsub) %x) {1557; CHECK-LABEL: define float @test_pow_f32__known_positive__y_11558; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]]) {1559; CHECK-NEXT: ret float [[X]]1560;1561 %pow = tail call float @_Z3powff(float %x, float 1.0)1562 ret float %pow1563}1564 1565define float @test_pow_f32__known_positive__y_neg1(float nofpclass(ninf nnorm nsub) %x) {1566; CHECK-LABEL: define float @test_pow_f32__known_positive__y_neg11567; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]]) {1568; CHECK-NEXT: [[__POWRECIP:%.*]] = fdiv float 1.000000e+00, [[X]]1569; CHECK-NEXT: ret float [[__POWRECIP]]1570;1571 %pow = tail call float @_Z3powff(float %x, float -1.0)1572 ret float %pow1573}1574 1575define float @test_pow_f32__known_positive__y_2(float nofpclass(ninf nnorm nsub) %x) {1576; CHECK-LABEL: define float @test_pow_f32__known_positive__y_21577; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]]) {1578; CHECK-NEXT: [[__POW2:%.*]] = fmul float [[X]], [[X]]1579; CHECK-NEXT: ret float [[__POW2]]1580;1581 %pow = tail call float @_Z3powff(float %x, float 2.0)1582 ret float %pow1583}1584 1585define float @test_pow_f32__known_positive__y_half(float nofpclass(ninf nnorm nsub) %x) {1586; CHECK-LABEL: define float @test_pow_f32__known_positive__y_half1587; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]]) {1588; CHECK-NEXT: [[__POW2SQRT:%.*]] = call float @_Z4sqrtf(float [[X]])1589; CHECK-NEXT: ret float [[__POW2SQRT]]1590;1591 %pow = tail call float @_Z3powff(float %x, float 0.5)1592 ret float %pow1593}1594 1595define float @test_pow_f32__known_positive__y_neghalf(float nofpclass(ninf nnorm nsub) %x) {1596; CHECK-LABEL: define float @test_pow_f32__known_positive__y_neghalf1597; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]]) {1598; CHECK-NEXT: [[__POW2RSQRT:%.*]] = call float @_Z5rsqrtf(float [[X]])1599; CHECK-NEXT: ret float [[__POW2RSQRT]]1600;1601 %pow = tail call float @_Z3powff(float %x, float -0.5)1602 ret float %pow1603}1604 1605define float @test_pow_f32_x_assumed_oge_0(float %x, float %y) {1606; CHECK-LABEL: define float @test_pow_f32_x_assumed_oge_01607; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {1608; CHECK-NEXT: [[X_OGE_ZERO:%.*]] = fcmp oge float [[X]], 0.000000e+001609; CHECK-NEXT: call void @llvm.assume(i1 [[X_OGE_ZERO]])1610; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4powrff(float [[X]], float [[Y]])1611; CHECK-NEXT: ret float [[POW]]1612;1613 %x.oge.zero = fcmp oge float %x, 0.01614 call void @llvm.assume(i1 %x.oge.zero)1615 %pow = tail call float @_Z3powff(float %x, float %y)1616 ret float %pow1617}1618 1619define float @test_pow_f32_x_assumed_ogt_0(float %x, float %y) {1620; CHECK-LABEL: define float @test_pow_f32_x_assumed_ogt_01621; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {1622; CHECK-NEXT: [[X_OGE_ZERO:%.*]] = fcmp ogt float [[X]], 0.000000e+001623; CHECK-NEXT: call void @llvm.assume(i1 [[X_OGE_ZERO]])1624; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4powrff(float [[X]], float [[Y]])1625; CHECK-NEXT: ret float [[POW]]1626;1627 %x.oge.zero = fcmp ogt float %x, 0.01628 call void @llvm.assume(i1 %x.oge.zero)1629 %pow = tail call float @_Z3powff(float %x, float %y)1630 ret float %pow1631}1632 1633define float @test_pow_f32_x_assumed_uge_0(float %x, float %y) {1634; CHECK-LABEL: define float @test_pow_f32_x_assumed_uge_01635; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {1636; CHECK-NEXT: [[X_UGE_ZERO:%.*]] = fcmp uge float [[X]], 0.000000e+001637; CHECK-NEXT: call void @llvm.assume(i1 [[X_UGE_ZERO]])1638; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4powrff(float [[X]], float [[Y]])1639; CHECK-NEXT: ret float [[POW]]1640;1641 %x.uge.zero = fcmp uge float %x, 0.01642 call void @llvm.assume(i1 %x.uge.zero)1643 %pow = tail call float @_Z3powff(float %x, float %y)1644 ret float %pow1645}1646 1647define float @test_pow_f32_x_assumed_ugt_0(float %x, float %y) {1648; CHECK-LABEL: define float @test_pow_f32_x_assumed_ugt_01649; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {1650; CHECK-NEXT: [[X_UGT_ZERO:%.*]] = fcmp ugt float [[X]], 0.000000e+001651; CHECK-NEXT: call void @llvm.assume(i1 [[X_UGT_ZERO]])1652; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4powrff(float [[X]], float [[Y]])1653; CHECK-NEXT: ret float [[POW]]1654;1655 %x.ugt.zero = fcmp ugt float %x, 0.01656 call void @llvm.assume(i1 %x.ugt.zero)1657 %pow = tail call float @_Z3powff(float %x, float %y)1658 ret float %pow1659}1660 1661define float @test_pow_afn_f32__y_poison(float %x) {1662; CHECK-LABEL: define float @test_pow_afn_f32__y_poison1663; CHECK-SAME: (float [[X:%.*]]) {1664; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 poison)1665; CHECK-NEXT: ret float [[POW]]1666;1667 %pow = tail call afn float @_Z3powff(float %x, float poison)1668 ret float %pow1669}1670 1671define float @test_pow_afn_f32__y_3(float %x) {1672; CHECK-LABEL: define float @test_pow_afn_f32__y_31673; CHECK-SAME: (float [[X:%.*]]) {1674; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 3)1675; CHECK-NEXT: ret float [[POW]]1676;1677 %pow = tail call afn float @_Z3powff(float %x, float 3.0)1678 ret float %pow1679}1680 1681define float @test_pow_afn_f32_nnan_ninf__y_3(float %x) {1682; CHECK-LABEL: define float @test_pow_afn_f32_nnan_ninf__y_31683; CHECK-SAME: (float [[X:%.*]]) {1684; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn float [[X]], [[X]]1685; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn float [[X]], [[__POWX2]]1686; CHECK-NEXT: ret float [[__POWPROD]]1687;1688 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float 3.0)1689 ret float %pow1690}1691 1692define float @test_pow_afn_f32__y_4(float %x) {1693; CHECK-LABEL: define float @test_pow_afn_f32__y_41694; CHECK-SAME: (float [[X:%.*]]) {1695; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 4)1696; CHECK-NEXT: ret float [[POW]]1697;1698 %pow = tail call afn float @_Z3powff(float %x, float 4.0)1699 ret float %pow1700}1701 1702define float @test_pow_afn_f32_nnan_ninf__y_4(float %x) {1703; CHECK-LABEL: define float @test_pow_afn_f32_nnan_ninf__y_41704; CHECK-SAME: (float [[X:%.*]]) {1705; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn float [[X]], [[X]]1706; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn float [[__POWX2]], [[__POWX2]]1707; CHECK-NEXT: ret float [[__POWX21]]1708;1709 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float 4.0)1710 ret float %pow1711}1712 1713define float @test_pow_afn_f32_nnan_ninf__y_4_5(float %x) {1714; CHECK-LABEL: define float @test_pow_afn_f32_nnan_ninf__y_4_51715; CHECK-SAME: (float [[X:%.*]]) {1716; CHECK-NEXT: [[POW:%.*]] = tail call nnan ninf afn float @_Z3powff(float [[X]], float 4.500000e+00)1717; CHECK-NEXT: ret float [[POW]]1718;1719 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float 4.5)1720 ret float %pow1721}1722 1723define float @test_pow_afn_f32__y_5(float %x) {1724; CHECK-LABEL: define float @test_pow_afn_f32__y_51725; CHECK-SAME: (float [[X:%.*]]) {1726; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 5)1727; CHECK-NEXT: ret float [[POW]]1728;1729 %pow = tail call afn float @_Z3powff(float %x, float 5.0)1730 ret float %pow1731}1732 1733define float @test_pow_afn_f32_nnan_ninf__y_5(float %x) {1734; CHECK-LABEL: define float @test_pow_afn_f32_nnan_ninf__y_51735; CHECK-SAME: (float [[X:%.*]]) {1736; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn float [[X]], [[X]]1737; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn float [[__POWX2]], [[__POWX2]]1738; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn float [[X]], [[__POWX21]]1739; CHECK-NEXT: ret float [[__POWPROD]]1740;1741 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float 5.0)1742 ret float %pow1743}1744 1745define float @test_pow_afn_f32__y_neg5(float %x) {1746; CHECK-LABEL: define float @test_pow_afn_f32__y_neg51747; CHECK-SAME: (float [[X:%.*]]) {1748; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 -5)1749; CHECK-NEXT: ret float [[POW]]1750;1751 %pow = tail call afn float @_Z3powff(float %x, float -5.0)1752 ret float %pow1753}1754 1755define float @test_pow_afn_f32_nnan_ninf__y_neg5(float %x) {1756; CHECK-LABEL: define float @test_pow_afn_f32_nnan_ninf__y_neg51757; CHECK-SAME: (float [[X:%.*]]) {1758; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn float [[X]], [[X]]1759; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn float [[__POWX2]], [[__POWX2]]1760; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn float [[X]], [[__POWX21]]1761; CHECK-NEXT: [[__1POWPROD:%.*]] = fdiv nnan ninf afn float 1.000000e+00, [[__POWPROD]]1762; CHECK-NEXT: ret float [[__1POWPROD]]1763;1764 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float -5.0)1765 ret float %pow1766}1767 1768define float @test_pow_afn_f32_nnan_ninf__y_10(float %x) {1769; CHECK-LABEL: define float @test_pow_afn_f32_nnan_ninf__y_101770; CHECK-SAME: (float [[X:%.*]]) {1771; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn float [[X]], [[X]]1772; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn float [[__POWX2]], [[__POWX2]]1773; CHECK-NEXT: [[__POWX22:%.*]] = fmul nnan ninf afn float [[__POWX21]], [[__POWX21]]1774; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn float [[__POWX2]], [[__POWX22]]1775; CHECK-NEXT: ret float [[__POWPROD]]1776;1777 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float 10.0)1778 ret float %pow1779}1780 1781define <2 x float> @test_pow_afn_v2f32_nnan_ninf__y_poison(<2 x float> %x) {1782; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_nnan_ninf__y_poison1783; CHECK-SAME: (<2 x float> [[X:%.*]]) {1784; CHECK-NEXT: ret <2 x float> poison1785;1786 %pow = tail call afn nnan ninf <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> poison)1787 ret <2 x float> %pow1788}1789 1790define <2 x float> @test_pow_afn_v2f32_nnan_ninf__y_3(<2 x float> %x) {1791; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_nnan_ninf__y_31792; CHECK-SAME: (<2 x float> [[X:%.*]]) {1793; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn <2 x float> [[X]], [[X]]1794; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn <2 x float> [[X]], [[__POWX2]]1795; CHECK-NEXT: ret <2 x float> [[__POWPROD]]1796;1797 %pow = tail call afn nnan ninf <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 3.0, float 3.0>)1798 ret <2 x float> %pow1799}1800 1801define <2 x float> @test_pow_afn_v2f32_nnan_ninf__y_4(<2 x float> %x) {1802; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_nnan_ninf__y_41803; CHECK-SAME: (<2 x float> [[X:%.*]]) {1804; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn <2 x float> [[X]], [[X]]1805; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn <2 x float> [[__POWX2]], [[__POWX2]]1806; CHECK-NEXT: ret <2 x float> [[__POWX21]]1807;1808 %pow = tail call afn nnan ninf <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 4.0, float 4.0>)1809 ret <2 x float> %pow1810}1811 1812define <2 x float> @test_pow_afn_v2f32_nnan_ninf__y_4_5(<2 x float> %x) {1813; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_nnan_ninf__y_4_51814; CHECK-SAME: (<2 x float> [[X:%.*]]) {1815; CHECK-NEXT: [[POW:%.*]] = tail call nnan ninf afn <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> splat (float 4.500000e+00))1816; CHECK-NEXT: ret <2 x float> [[POW]]1817;1818 %pow = tail call afn nnan ninf <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 4.5, float 4.5>)1819 ret <2 x float> %pow1820}1821 1822define <2 x float> @test_pow_afn_v2f32_nnan_ninf__y_4_5_undef(<2 x float> %x) {1823; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_nnan_ninf__y_4_5_undef1824; CHECK-SAME: (<2 x float> [[X:%.*]]) {1825; CHECK-NEXT: [[POW:%.*]] = tail call nnan ninf afn <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> <float 4.500000e+00, float poison>)1826; CHECK-NEXT: ret <2 x float> [[POW]]1827;1828 %pow = tail call afn nnan ninf <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 4.5, float poison>)1829 ret <2 x float> %pow1830}1831 1832define <2 x float> @test_pow_afn_v2f32_nnan_ninf__y_5(<2 x float> %x) {1833; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_nnan_ninf__y_51834; CHECK-SAME: (<2 x float> [[X:%.*]]) {1835; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn <2 x float> [[X]], [[X]]1836; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn <2 x float> [[__POWX2]], [[__POWX2]]1837; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn <2 x float> [[X]], [[__POWX21]]1838; CHECK-NEXT: ret <2 x float> [[__POWPROD]]1839;1840 %pow = tail call afn nnan ninf <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 5.0, float 5.0>)1841 ret <2 x float> %pow1842}1843 1844define float @test_pow_afn_f32_nnan_ninf__y_5_known_positive(float nofpclass(ninf nsub nnorm) %x) {1845; CHECK-LABEL: define float @test_pow_afn_f32_nnan_ninf__y_5_known_positive1846; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]]) {1847; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn float [[X]], [[X]]1848; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn float [[__POWX2]], [[__POWX2]]1849; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn float [[X]], [[__POWX21]]1850; CHECK-NEXT: ret float [[__POWPROD]]1851;1852 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float 5.0)1853 ret float %pow1854}1855 1856; we know we can ignore missing ninf on the input from the flag on the call1857define float @test_pow_afn_f32_nnan_ninf__y_5_known_positive_with_ninf_flag(float nofpclass(nsub nnorm) %x) {1858; CHECK-LABEL: define float @test_pow_afn_f32_nnan_ninf__y_5_known_positive_with_ninf_flag1859; CHECK-SAME: (float nofpclass(nsub nnorm) [[X:%.*]]) {1860; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn float [[X]], [[X]]1861; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn float [[__POWX2]], [[__POWX2]]1862; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn float [[X]], [[__POWX21]]1863; CHECK-NEXT: ret float [[__POWPROD]]1864;1865 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float 5.0)1866 ret float %pow1867}1868 1869define double @test_pow_afn_f64__y_3(double %x) {1870; CHECK-LABEL: define double @test_pow_afn_f64__y_31871; CHECK-SAME: (double [[X:%.*]]) {1872; CHECK-NEXT: [[POW:%.*]] = tail call afn double @_Z4powndi(double [[X]], i32 3)1873; CHECK-NEXT: ret double [[POW]]1874;1875 %pow = tail call afn double @_Z3powdd(double %x, double 3.0)1876 ret double %pow1877}1878 1879define double @test_pow_afn_f64_nnan_ninf__y_3(double %x) {1880; CHECK-LABEL: define double @test_pow_afn_f64_nnan_ninf__y_31881; CHECK-SAME: (double [[X:%.*]]) {1882; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn double [[X]], [[X]]1883; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn double [[X]], [[__POWX2]]1884; CHECK-NEXT: ret double [[__POWPROD]]1885;1886 %pow = tail call afn nnan ninf double @_Z3powdd(double %x, double 3.0)1887 ret double %pow1888}1889 1890define double @test_pow_afn_f64__y_4(double %x) {1891; CHECK-LABEL: define double @test_pow_afn_f64__y_41892; CHECK-SAME: (double [[X:%.*]]) {1893; CHECK-NEXT: [[POW:%.*]] = tail call afn double @_Z4powndi(double [[X]], i32 4)1894; CHECK-NEXT: ret double [[POW]]1895;1896 %pow = tail call afn double @_Z3powdd(double %x, double 4.0)1897 ret double %pow1898}1899 1900define double @test_pow_afn_f64_nnan_ninf__y_4(double %x) {1901; CHECK-LABEL: define double @test_pow_afn_f64_nnan_ninf__y_41902; CHECK-SAME: (double [[X:%.*]]) {1903; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn double [[X]], [[X]]1904; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn double [[__POWX2]], [[__POWX2]]1905; CHECK-NEXT: ret double [[__POWX21]]1906;1907 %pow = tail call afn nnan ninf double @_Z3powdd(double %x, double 4.0)1908 ret double %pow1909}1910 1911define double @test_pow_afn_f64_nnan_ninf__y_4_5(double %x) {1912; CHECK-LABEL: define double @test_pow_afn_f64_nnan_ninf__y_4_51913; CHECK-SAME: (double [[X:%.*]]) {1914; CHECK-NEXT: [[POW:%.*]] = tail call nnan ninf afn double @_Z3powdd(double [[X]], double 4.500000e+00)1915; CHECK-NEXT: ret double [[POW]]1916;1917 %pow = tail call afn nnan ninf double @_Z3powdd(double %x, double 4.5)1918 ret double %pow1919}1920 1921define double @test_pow_afn_f64__y_5(double %x) {1922; CHECK-LABEL: define double @test_pow_afn_f64__y_51923; CHECK-SAME: (double [[X:%.*]]) {1924; CHECK-NEXT: [[POW:%.*]] = tail call afn double @_Z4powndi(double [[X]], i32 5)1925; CHECK-NEXT: ret double [[POW]]1926;1927 %pow = tail call afn double @_Z3powdd(double %x, double 5.0)1928 ret double %pow1929}1930 1931define double @test_pow_afn_f64_nnan_ninf__y_5(double %x) {1932; CHECK-LABEL: define double @test_pow_afn_f64_nnan_ninf__y_51933; CHECK-SAME: (double [[X:%.*]]) {1934; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn double [[X]], [[X]]1935; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn double [[__POWX2]], [[__POWX2]]1936; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn double [[X]], [[__POWX21]]1937; CHECK-NEXT: ret double [[__POWPROD]]1938;1939 %pow = tail call afn nnan ninf double @_Z3powdd(double %x, double 5.0)1940 ret double %pow1941}1942 1943define double @test_pow_afn_f64__y_neg5(double %x) {1944; CHECK-LABEL: define double @test_pow_afn_f64__y_neg51945; CHECK-SAME: (double [[X:%.*]]) {1946; CHECK-NEXT: [[POW:%.*]] = tail call afn double @_Z4powndi(double [[X]], i32 -5)1947; CHECK-NEXT: ret double [[POW]]1948;1949 %pow = tail call afn double @_Z3powdd(double %x, double -5.0)1950 ret double %pow1951}1952 1953define double @test_pow_afn_f64_nnan_ninf__y_neg5(double %x) {1954; CHECK-LABEL: define double @test_pow_afn_f64_nnan_ninf__y_neg51955; CHECK-SAME: (double [[X:%.*]]) {1956; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn double [[X]], [[X]]1957; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn double [[__POWX2]], [[__POWX2]]1958; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn double [[X]], [[__POWX21]]1959; CHECK-NEXT: [[__1POWPROD:%.*]] = fdiv nnan ninf afn double 1.000000e+00, [[__POWPROD]]1960; CHECK-NEXT: ret double [[__1POWPROD]]1961;1962 %pow = tail call afn nnan ninf double @_Z3powdd(double %x, double -5.0)1963 ret double %pow1964}1965 1966define double @test_pow_afn_f64_nnan_ninf__y_10(double %x) {1967; CHECK-LABEL: define double @test_pow_afn_f64_nnan_ninf__y_101968; CHECK-SAME: (double [[X:%.*]]) {1969; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn double [[X]], [[X]]1970; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn double [[__POWX2]], [[__POWX2]]1971; CHECK-NEXT: [[__POWX22:%.*]] = fmul nnan ninf afn double [[__POWX21]], [[__POWX21]]1972; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn double [[__POWX2]], [[__POWX22]]1973; CHECK-NEXT: ret double [[__POWPROD]]1974;1975 %pow = tail call afn nnan ninf double @_Z3powdd(double %x, double 10.0)1976 ret double %pow1977}1978 1979define <2 x double> @test_pow_afn_v2f64_nnan_ninf__y_3(<2 x double> %x) {1980; CHECK-LABEL: define <2 x double> @test_pow_afn_v2f64_nnan_ninf__y_31981; CHECK-SAME: (<2 x double> [[X:%.*]]) {1982; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn <2 x double> [[X]], [[X]]1983; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn <2 x double> [[X]], [[__POWX2]]1984; CHECK-NEXT: ret <2 x double> [[__POWPROD]]1985;1986 %pow = tail call afn nnan ninf <2 x double> @_Z3powDv2_dS_(<2 x double> %x, <2 x double> <double 3.0, double 3.0>)1987 ret <2 x double> %pow1988}1989 1990define <2 x double> @test_pow_afn_v2f64_nnan_ninf__y_4(<2 x double> %x) {1991; CHECK-LABEL: define <2 x double> @test_pow_afn_v2f64_nnan_ninf__y_41992; CHECK-SAME: (<2 x double> [[X:%.*]]) {1993; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn <2 x double> [[X]], [[X]]1994; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn <2 x double> [[__POWX2]], [[__POWX2]]1995; CHECK-NEXT: ret <2 x double> [[__POWX21]]1996;1997 %pow = tail call afn nnan ninf <2 x double> @_Z3powDv2_dS_(<2 x double> %x, <2 x double> <double 4.0, double 4.0>)1998 ret <2 x double> %pow1999}2000 2001define <2 x double> @test_pow_afn_v2f64_nnan_ninf__y_4_5(<2 x double> %x) {2002; CHECK-LABEL: define <2 x double> @test_pow_afn_v2f64_nnan_ninf__y_4_52003; CHECK-SAME: (<2 x double> [[X:%.*]]) {2004; CHECK-NEXT: [[POW:%.*]] = tail call nnan ninf afn <2 x double> @_Z3powDv2_dS_(<2 x double> [[X]], <2 x double> splat (double 4.500000e+00))2005; CHECK-NEXT: ret <2 x double> [[POW]]2006;2007 %pow = tail call afn nnan ninf <2 x double> @_Z3powDv2_dS_(<2 x double> %x, <2 x double> <double 4.5, double 4.5>)2008 ret <2 x double> %pow2009}2010 2011define <2 x double> @test_pow_afn_v2f64_nnan_ninf__y_5(<2 x double> %x) {2012; CHECK-LABEL: define <2 x double> @test_pow_afn_v2f64_nnan_ninf__y_52013; CHECK-SAME: (<2 x double> [[X:%.*]]) {2014; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn <2 x double> [[X]], [[X]]2015; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn <2 x double> [[__POWX2]], [[__POWX2]]2016; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn <2 x double> [[X]], [[__POWX21]]2017; CHECK-NEXT: ret <2 x double> [[__POWPROD]]2018;2019 %pow = tail call afn nnan ninf <2 x double> @_Z3powDv2_dS_(<2 x double> %x, <2 x double> <double 5.0, double 5.0>)2020 ret <2 x double> %pow2021}2022 2023define half @test_pow_afn_f16__y_3(half %x) {2024; CHECK-LABEL: define half @test_pow_afn_f16__y_32025; CHECK-SAME: (half [[X:%.*]]) {2026; CHECK-NEXT: [[POW:%.*]] = tail call afn half @_Z4pownDhi(half [[X]], i32 3)2027; CHECK-NEXT: ret half [[POW]]2028;2029 %pow = tail call afn half @_Z3powDhDh(half %x, half 3.0)2030 ret half %pow2031}2032 2033define half @test_pow_afn_f16_nnan_ninf__y_3(half %x) {2034; CHECK-LABEL: define half @test_pow_afn_f16_nnan_ninf__y_32035; CHECK-SAME: (half [[X:%.*]]) {2036; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn half [[X]], [[X]]2037; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn half [[X]], [[__POWX2]]2038; CHECK-NEXT: ret half [[__POWPROD]]2039;2040 %pow = tail call afn nnan ninf half @_Z3powDhDh(half %x, half 3.0)2041 ret half %pow2042}2043 2044define half @test_pow_afn_f16__y_4(half %x) {2045; CHECK-LABEL: define half @test_pow_afn_f16__y_42046; CHECK-SAME: (half [[X:%.*]]) {2047; CHECK-NEXT: [[POW:%.*]] = tail call afn half @_Z4pownDhi(half [[X]], i32 4)2048; CHECK-NEXT: ret half [[POW]]2049;2050 %pow = tail call afn half @_Z3powDhDh(half %x, half 4.0)2051 ret half %pow2052}2053 2054define half @test_pow_afn_f16_nnan_ninf__y_4(half %x) {2055; CHECK-LABEL: define half @test_pow_afn_f16_nnan_ninf__y_42056; CHECK-SAME: (half [[X:%.*]]) {2057; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn half [[X]], [[X]]2058; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn half [[__POWX2]], [[__POWX2]]2059; CHECK-NEXT: ret half [[__POWX21]]2060;2061 %pow = tail call afn nnan ninf half @_Z3powDhDh(half %x, half 4.0)2062 ret half %pow2063}2064 2065define half @test_pow_afn_f16_nnan_ninf__y_4_5(half %x) {2066; CHECK-LABEL: define half @test_pow_afn_f16_nnan_ninf__y_4_52067; CHECK-SAME: (half [[X:%.*]]) {2068; CHECK-NEXT: [[POW:%.*]] = tail call nnan ninf afn half @_Z3powDhDh(half [[X]], half 0xH4480)2069; CHECK-NEXT: ret half [[POW]]2070;2071 %pow = tail call afn nnan ninf half @_Z3powDhDh(half %x, half 4.5)2072 ret half %pow2073}2074 2075define half @test_pow_afn_f16__y_5(half %x) {2076; CHECK-LABEL: define half @test_pow_afn_f16__y_52077; CHECK-SAME: (half [[X:%.*]]) {2078; CHECK-NEXT: [[POW:%.*]] = tail call afn half @_Z4pownDhi(half [[X]], i32 5)2079; CHECK-NEXT: ret half [[POW]]2080;2081 %pow = tail call afn half @_Z3powDhDh(half %x, half 5.0)2082 ret half %pow2083}2084 2085define half @test_pow_afn_f16_nnan_ninf__y_5(half %x) {2086; CHECK-LABEL: define half @test_pow_afn_f16_nnan_ninf__y_52087; CHECK-SAME: (half [[X:%.*]]) {2088; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn half [[X]], [[X]]2089; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn half [[__POWX2]], [[__POWX2]]2090; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn half [[X]], [[__POWX21]]2091; CHECK-NEXT: ret half [[__POWPROD]]2092;2093 %pow = tail call afn nnan ninf half @_Z3powDhDh(half %x, half 5.0)2094 ret half %pow2095}2096 2097define half @test_pow_afn_f16__y_neg5(half %x) {2098; CHECK-LABEL: define half @test_pow_afn_f16__y_neg52099; CHECK-SAME: (half [[X:%.*]]) {2100; CHECK-NEXT: [[POW:%.*]] = tail call afn half @_Z4pownDhi(half [[X]], i32 -5)2101; CHECK-NEXT: ret half [[POW]]2102;2103 %pow = tail call afn half @_Z3powDhDh(half %x, half -5.0)2104 ret half %pow2105}2106 2107define half @test_pow_afn_f16_nnan_ninf__y_neg5(half %x) {2108; CHECK-LABEL: define half @test_pow_afn_f16_nnan_ninf__y_neg52109; CHECK-SAME: (half [[X:%.*]]) {2110; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn half [[X]], [[X]]2111; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn half [[__POWX2]], [[__POWX2]]2112; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn half [[X]], [[__POWX21]]2113; CHECK-NEXT: [[__1POWPROD:%.*]] = fdiv nnan ninf afn half 0xH3C00, [[__POWPROD]]2114; CHECK-NEXT: ret half [[__1POWPROD]]2115;2116 %pow = tail call afn nnan ninf half @_Z3powDhDh(half %x, half -5.0)2117 ret half %pow2118}2119 2120define half @test_pow_afn_f16_nnan_ninf__y_10(half %x) {2121; CHECK-LABEL: define half @test_pow_afn_f16_nnan_ninf__y_102122; CHECK-SAME: (half [[X:%.*]]) {2123; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn half [[X]], [[X]]2124; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn half [[__POWX2]], [[__POWX2]]2125; CHECK-NEXT: [[__POWX22:%.*]] = fmul nnan ninf afn half [[__POWX21]], [[__POWX21]]2126; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn half [[__POWX2]], [[__POWX22]]2127; CHECK-NEXT: ret half [[__POWPROD]]2128;2129 %pow = tail call afn nnan ninf half @_Z3powDhDh(half %x, half 10.0)2130 ret half %pow2131}2132 2133define <2 x half> @test_pow_afn_v2f16_nnan_ninf__y_3(<2 x half> %x) {2134; CHECK-LABEL: define <2 x half> @test_pow_afn_v2f16_nnan_ninf__y_32135; CHECK-SAME: (<2 x half> [[X:%.*]]) {2136; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn <2 x half> [[X]], [[X]]2137; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn <2 x half> [[X]], [[__POWX2]]2138; CHECK-NEXT: ret <2 x half> [[__POWPROD]]2139;2140 %pow = tail call afn nnan ninf <2 x half> @_Z3powDv2_DhS_(<2 x half> %x, <2 x half> <half 3.0, half 3.0>)2141 ret <2 x half> %pow2142}2143 2144define <2 x half> @test_pow_afn_v2f16_nnan_ninf__y_4(<2 x half> %x) {2145; CHECK-LABEL: define <2 x half> @test_pow_afn_v2f16_nnan_ninf__y_42146; CHECK-SAME: (<2 x half> [[X:%.*]]) {2147; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn <2 x half> [[X]], [[X]]2148; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn <2 x half> [[__POWX2]], [[__POWX2]]2149; CHECK-NEXT: ret <2 x half> [[__POWX21]]2150;2151 %pow = tail call afn nnan ninf <2 x half> @_Z3powDv2_DhS_(<2 x half> %x, <2 x half> <half 4.0, half 4.0>)2152 ret <2 x half> %pow2153}2154 2155define <2 x half> @test_pow_afn_v2f16_nnan_ninf__y_4_5(<2 x half> %x) {2156; CHECK-LABEL: define <2 x half> @test_pow_afn_v2f16_nnan_ninf__y_4_52157; CHECK-SAME: (<2 x half> [[X:%.*]]) {2158; CHECK-NEXT: [[POW:%.*]] = tail call nnan ninf afn <2 x half> @_Z3powDv2_DhS_(<2 x half> [[X]], <2 x half> splat (half 0xH4480))2159; CHECK-NEXT: ret <2 x half> [[POW]]2160;2161 %pow = tail call afn nnan ninf <2 x half> @_Z3powDv2_DhS_(<2 x half> %x, <2 x half> <half 4.5, half 4.5>)2162 ret <2 x half> %pow2163}2164 2165define <2 x half> @test_pow_afn_v2f16_nnan_ninf__y_5(<2 x half> %x) {2166; CHECK-LABEL: define <2 x half> @test_pow_afn_v2f16_nnan_ninf__y_52167; CHECK-SAME: (<2 x half> [[X:%.*]]) {2168; CHECK-NEXT: [[__POWX2:%.*]] = fmul nnan ninf afn <2 x half> [[X]], [[X]]2169; CHECK-NEXT: [[__POWX21:%.*]] = fmul nnan ninf afn <2 x half> [[__POWX2]], [[__POWX2]]2170; CHECK-NEXT: [[__POWPROD:%.*]] = fmul nnan ninf afn <2 x half> [[X]], [[__POWX21]]2171; CHECK-NEXT: ret <2 x half> [[__POWPROD]]2172;2173 %pow = tail call afn nnan ninf <2 x half> @_Z3powDv2_DhS_(<2 x half> %x, <2 x half> <half 5.0, half 5.0>)2174 ret <2 x half> %pow2175}2176 2177define float @test_pow_f32_known_integral_sitofp(float %x, i32 %y) {2178; CHECK-LABEL: define float @test_pow_f32_known_integral_sitofp2179; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {2180; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i32 [[Y]] to float2181; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y_CAST]] to i322182; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 [[TMP1]])2183; CHECK-NEXT: ret float [[POW]]2184;2185 %y.cast = sitofp i32 %y to float2186 %pow = tail call float @_Z3powff(float %x, float %y.cast)2187 ret float %pow2188}2189 2190define float @test_pow_afn_f32_known_integral_sitofp(float %x, i32 %y) {2191; CHECK-LABEL: define float @test_pow_afn_f32_known_integral_sitofp2192; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {2193; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i32 [[Y]] to float2194; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y_CAST]] to i322195; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 [[TMP1]])2196; CHECK-NEXT: ret float [[POW]]2197;2198 %y.cast = sitofp i32 %y to float2199 %pow = tail call afn float @_Z3powff(float %x, float %y.cast)2200 ret float %pow2201}2202 2203define float @test_pow_afn_nnan_ninf_f32_known_integral_sitofp(float %x, i32 %y) {2204; CHECK-LABEL: define float @test_pow_afn_nnan_ninf_f32_known_integral_sitofp2205; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {2206; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i32 [[Y]] to float2207; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y_CAST]] to i322208; CHECK-NEXT: [[__FABS:%.*]] = call nnan ninf afn float @llvm.fabs.f32(float [[X]])2209; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn float @llvm.log2.f32(float [[__FABS]])2210; CHECK-NEXT: [[POWNI2F:%.*]] = sitofp i32 [[TMP1]] to float2211; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn float [[__LOG2]], [[POWNI2F]]2212; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn float @llvm.exp2.f32(float [[__YLOGX]])2213; CHECK-NEXT: [[__YEVEN:%.*]] = shl i32 [[TMP1]], 312214; CHECK-NEXT: [[TMP2:%.*]] = bitcast float [[X]] to i322215; CHECK-NEXT: [[__POW_SIGN:%.*]] = and i32 [[__YEVEN]], [[TMP2]]2216; CHECK-NEXT: [[TMP3:%.*]] = bitcast float [[__EXP2]] to i322217; CHECK-NEXT: [[TMP4:%.*]] = or disjoint i32 [[__POW_SIGN]], [[TMP3]]2218; CHECK-NEXT: [[TMP5:%.*]] = bitcast i32 [[TMP4]] to float2219; CHECK-NEXT: ret float [[TMP5]]2220;2221 %y.cast = sitofp i32 %y to float2222 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float %y.cast)2223 ret float %pow2224}2225 2226define float @test_pow_afn_nnan_f32_known_integral_sitofp(float %x, i32 %y) {2227; CHECK-LABEL: define float @test_pow_afn_nnan_f32_known_integral_sitofp2228; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {2229; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i32 [[Y]] to float2230; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y_CAST]] to i322231; CHECK-NEXT: [[POW:%.*]] = tail call nnan afn float @_Z4pownfi(float [[X]], i32 [[TMP1]])2232; CHECK-NEXT: ret float [[POW]]2233;2234 %y.cast = sitofp i32 %y to float2235 %pow = tail call afn nnan float @_Z3powff(float %x, float %y.cast)2236 ret float %pow2237}2238 2239define float @test_pow_afn_ninf_f32_known_integral_sitofp(float %x, i32 %y) {2240; CHECK-LABEL: define float @test_pow_afn_ninf_f32_known_integral_sitofp2241; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {2242; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i32 [[Y]] to float2243; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y_CAST]] to i322244; CHECK-NEXT: [[POW:%.*]] = tail call ninf afn float @_Z4pownfi(float [[X]], i32 [[TMP1]])2245; CHECK-NEXT: ret float [[POW]]2246;2247 %y.cast = sitofp i32 %y to float2248 %pow = tail call afn ninf float @_Z3powff(float %x, float %y.cast)2249 ret float %pow2250}2251 2252define float @test_pow_afn_f32_known_integral_sitofp_finite_argument(float %x, i32 %y) {2253; CHECK-LABEL: define float @test_pow_afn_f32_known_integral_sitofp_finite_argument2254; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {2255; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i32 [[Y]] to float2256; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y_CAST]] to i322257; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 [[TMP1]])2258; CHECK-NEXT: ret float [[POW]]2259;2260 %y.cast = sitofp i32 %y to float2261 %pow = tail call float @_Z3powff(float %x, float nofpclass(inf nan) %y.cast)2262 ret float %pow2263}2264 2265define float @test_pow_f32_known_integral_uitofp(float %x, i32 %y) {2266; CHECK-LABEL: define float @test_pow_f32_known_integral_uitofp2267; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {2268; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp i32 [[Y]] to float2269; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y_CAST]] to i322270; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 [[TMP1]])2271; CHECK-NEXT: ret float [[POW]]2272;2273 %y.cast = uitofp i32 %y to float2274 %pow = tail call float @_Z3powff(float %x, float %y.cast)2275 ret float %pow2276}2277 2278define float @test_pow_afn_f32_known_integral_uitofp(float %x, i32 %y) {2279; CHECK-LABEL: define float @test_pow_afn_f32_known_integral_uitofp2280; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {2281; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp i32 [[Y]] to float2282; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y_CAST]] to i322283; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 [[TMP1]])2284; CHECK-NEXT: ret float [[POW]]2285;2286 %y.cast = uitofp i32 %y to float2287 %pow = tail call afn float @_Z3powff(float %x, float %y.cast)2288 ret float %pow2289}2290 2291define float @test_pow_afn_nnan_ninf_f32_known_integral_uitofp(float %x, i32 %y) {2292; CHECK-LABEL: define float @test_pow_afn_nnan_ninf_f32_known_integral_uitofp2293; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {2294; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp i32 [[Y]] to float2295; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y_CAST]] to i322296; CHECK-NEXT: [[__FABS:%.*]] = call nnan ninf afn float @llvm.fabs.f32(float [[X]])2297; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn float @llvm.log2.f32(float [[__FABS]])2298; CHECK-NEXT: [[POWNI2F:%.*]] = sitofp i32 [[TMP1]] to float2299; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn float [[__LOG2]], [[POWNI2F]]2300; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn float @llvm.exp2.f32(float [[__YLOGX]])2301; CHECK-NEXT: [[__YEVEN:%.*]] = shl i32 [[TMP1]], 312302; CHECK-NEXT: [[TMP2:%.*]] = bitcast float [[X]] to i322303; CHECK-NEXT: [[__POW_SIGN:%.*]] = and i32 [[__YEVEN]], [[TMP2]]2304; CHECK-NEXT: [[TMP3:%.*]] = bitcast float [[__EXP2]] to i322305; CHECK-NEXT: [[TMP4:%.*]] = or disjoint i32 [[__POW_SIGN]], [[TMP3]]2306; CHECK-NEXT: [[TMP5:%.*]] = bitcast i32 [[TMP4]] to float2307; CHECK-NEXT: ret float [[TMP5]]2308;2309 %y.cast = uitofp i32 %y to float2310 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float %y.cast)2311 ret float %pow2312}2313 2314; cast from i256 may produce infinity so can't assume integer without ninf2315define float @test_pow_afn_nnan_f32_known_integral_uitofp_i256(float %x, i256 %y) {2316; CHECK-LABEL: define float @test_pow_afn_nnan_f32_known_integral_uitofp_i2562317; CHECK-SAME: (float [[X:%.*]], i256 [[Y:%.*]]) {2318; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp i256 [[Y]] to float2319; CHECK-NEXT: [[POW:%.*]] = tail call nnan afn float @_Z3powff(float [[X]], float [[Y_CAST]])2320; CHECK-NEXT: ret float [[POW]]2321;2322 %y.cast = uitofp i256 %y to float2323 %pow = tail call afn nnan float @_Z3powff(float %x, float %y.cast)2324 ret float %pow2325}2326 2327; cast from i256 may produce infinity so can't assume integer without ninf2328define float @test_pow_afn_nnan_f32_known_integral_sitofp_i256(float %x, i256 %y) {2329; CHECK-LABEL: define float @test_pow_afn_nnan_f32_known_integral_sitofp_i2562330; CHECK-SAME: (float [[X:%.*]], i256 [[Y:%.*]]) {2331; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i256 [[Y]] to float2332; CHECK-NEXT: [[POW:%.*]] = tail call nnan afn float @_Z3powff(float [[X]], float [[Y_CAST]])2333; CHECK-NEXT: ret float [[POW]]2334;2335 %y.cast = sitofp i256 %y to float2336 %pow = tail call afn nnan float @_Z3powff(float %x, float %y.cast)2337 ret float %pow2338}2339 2340define float @test_pow_afn_nnan_ninf_f32_known_integral_uitofp_i256(float %x, i256 %y) {2341; CHECK-LABEL: define float @test_pow_afn_nnan_ninf_f32_known_integral_uitofp_i2562342; CHECK-SAME: (float [[X:%.*]], i256 [[Y:%.*]]) {2343; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp i256 [[Y]] to float2344; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y_CAST]] to i322345; CHECK-NEXT: [[__FABS:%.*]] = call nnan ninf afn float @llvm.fabs.f32(float [[X]])2346; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn float @llvm.log2.f32(float [[__FABS]])2347; CHECK-NEXT: [[POWNI2F:%.*]] = sitofp i32 [[TMP1]] to float2348; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn float [[__LOG2]], [[POWNI2F]]2349; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn float @llvm.exp2.f32(float [[__YLOGX]])2350; CHECK-NEXT: [[__YEVEN:%.*]] = shl i32 [[TMP1]], 312351; CHECK-NEXT: [[TMP2:%.*]] = bitcast float [[X]] to i322352; CHECK-NEXT: [[__POW_SIGN:%.*]] = and i32 [[__YEVEN]], [[TMP2]]2353; CHECK-NEXT: [[TMP3:%.*]] = bitcast float [[__EXP2]] to i322354; CHECK-NEXT: [[TMP4:%.*]] = or disjoint i32 [[__POW_SIGN]], [[TMP3]]2355; CHECK-NEXT: [[TMP5:%.*]] = bitcast i32 [[TMP4]] to float2356; CHECK-NEXT: ret float [[TMP5]]2357;2358 %y.cast = uitofp i256 %y to float2359 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float %y.cast)2360 ret float %pow2361}2362 2363define float @test_pow_afn_nnan_ninf_f32_known_integral_sitofp_i256(float %x, i256 %y) {2364; CHECK-LABEL: define float @test_pow_afn_nnan_ninf_f32_known_integral_sitofp_i2562365; CHECK-SAME: (float [[X:%.*]], i256 [[Y:%.*]]) {2366; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i256 [[Y]] to float2367; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y_CAST]] to i322368; CHECK-NEXT: [[__FABS:%.*]] = call nnan ninf afn float @llvm.fabs.f32(float [[X]])2369; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn float @llvm.log2.f32(float [[__FABS]])2370; CHECK-NEXT: [[POWNI2F:%.*]] = sitofp i32 [[TMP1]] to float2371; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn float [[__LOG2]], [[POWNI2F]]2372; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn float @llvm.exp2.f32(float [[__YLOGX]])2373; CHECK-NEXT: [[__YEVEN:%.*]] = shl i32 [[TMP1]], 312374; CHECK-NEXT: [[TMP2:%.*]] = bitcast float [[X]] to i322375; CHECK-NEXT: [[__POW_SIGN:%.*]] = and i32 [[__YEVEN]], [[TMP2]]2376; CHECK-NEXT: [[TMP3:%.*]] = bitcast float [[__EXP2]] to i322377; CHECK-NEXT: [[TMP4:%.*]] = or disjoint i32 [[__POW_SIGN]], [[TMP3]]2378; CHECK-NEXT: [[TMP5:%.*]] = bitcast i32 [[TMP4]] to float2379; CHECK-NEXT: ret float [[TMP5]]2380;2381 %y.cast = sitofp i256 %y to float2382 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float %y.cast)2383 ret float %pow2384}2385 2386define <2 x float> @test_pow_afn_nnan_ninf_v2f32_known_integral_sitofp(<2 x float> %x, <2 x i32> %y) {2387; CHECK-LABEL: define <2 x float> @test_pow_afn_nnan_ninf_v2f32_known_integral_sitofp2388; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x i32> [[Y:%.*]]) {2389; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp <2 x i32> [[Y]] to <2 x float>2390; CHECK-NEXT: [[TMP1:%.*]] = fptosi <2 x float> [[Y_CAST]] to <2 x i32>2391; CHECK-NEXT: [[__FABS:%.*]] = call nnan ninf afn <2 x float> @llvm.fabs.v2f32(<2 x float> [[X]])2392; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn <2 x float> @llvm.log2.v2f32(<2 x float> [[__FABS]])2393; CHECK-NEXT: [[POWNI2F:%.*]] = sitofp <2 x i32> [[TMP1]] to <2 x float>2394; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn <2 x float> [[__LOG2]], [[POWNI2F]]2395; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn <2 x float> @llvm.exp2.v2f32(<2 x float> [[__YLOGX]])2396; CHECK-NEXT: [[__YEVEN:%.*]] = shl <2 x i32> [[TMP1]], splat (i32 31)2397; CHECK-NEXT: [[TMP2:%.*]] = bitcast <2 x float> [[X]] to <2 x i32>2398; CHECK-NEXT: [[__POW_SIGN:%.*]] = and <2 x i32> [[__YEVEN]], [[TMP2]]2399; CHECK-NEXT: [[TMP3:%.*]] = bitcast <2 x float> [[__EXP2]] to <2 x i32>2400; CHECK-NEXT: [[TMP4:%.*]] = or disjoint <2 x i32> [[__POW_SIGN]], [[TMP3]]2401; CHECK-NEXT: [[TMP5:%.*]] = bitcast <2 x i32> [[TMP4]] to <2 x float>2402; CHECK-NEXT: ret <2 x float> [[TMP5]]2403;2404 %y.cast = sitofp <2 x i32> %y to <2 x float>2405 %pow = tail call afn nnan ninf <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> %y.cast)2406 ret <2 x float> %pow2407}2408 2409define <2 x float> @test_pow_v2f32_known_integral_uitofp(<2 x float> %x, <2 x i32> %y) {2410; CHECK-LABEL: define <2 x float> @test_pow_v2f32_known_integral_uitofp2411; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x i32> [[Y:%.*]]) {2412; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp <2 x i32> [[Y]] to <2 x float>2413; CHECK-NEXT: [[TMP1:%.*]] = fptosi <2 x float> [[Y_CAST]] to <2 x i32>2414; CHECK-NEXT: [[POW:%.*]] = tail call <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> [[TMP1]])2415; CHECK-NEXT: ret <2 x float> [[POW]]2416;2417 %y.cast = uitofp <2 x i32> %y to <2 x float>2418 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> %y.cast)2419 ret <2 x float> %pow2420}2421 2422define <2 x float> @test_pow_afn_v2f32_known_integral_uitofp(<2 x float> %x, <2 x i32> %y) {2423; CHECK-LABEL: define <2 x float> @test_pow_afn_v2f32_known_integral_uitofp2424; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x i32> [[Y:%.*]]) {2425; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp <2 x i32> [[Y]] to <2 x float>2426; CHECK-NEXT: [[TMP1:%.*]] = fptosi <2 x float> [[Y_CAST]] to <2 x i32>2427; CHECK-NEXT: [[POW:%.*]] = tail call afn <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> [[TMP1]])2428; CHECK-NEXT: ret <2 x float> [[POW]]2429;2430 %y.cast = uitofp <2 x i32> %y to <2 x float>2431 %pow = tail call afn <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> %y.cast)2432 ret <2 x float> %pow2433}2434 2435define <2 x float> @test_pow_afn_nnan_ninf_v2f32_known_integral_uitofp(<2 x float> %x, <2 x i32> %y) {2436; CHECK-LABEL: define <2 x float> @test_pow_afn_nnan_ninf_v2f32_known_integral_uitofp2437; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x i32> [[Y:%.*]]) {2438; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp <2 x i32> [[Y]] to <2 x float>2439; CHECK-NEXT: [[TMP1:%.*]] = fptosi <2 x float> [[Y_CAST]] to <2 x i32>2440; CHECK-NEXT: [[__FABS:%.*]] = call nnan ninf afn <2 x float> @llvm.fabs.v2f32(<2 x float> [[X]])2441; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn <2 x float> @llvm.log2.v2f32(<2 x float> [[__FABS]])2442; CHECK-NEXT: [[POWNI2F:%.*]] = sitofp <2 x i32> [[TMP1]] to <2 x float>2443; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn <2 x float> [[__LOG2]], [[POWNI2F]]2444; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn <2 x float> @llvm.exp2.v2f32(<2 x float> [[__YLOGX]])2445; CHECK-NEXT: [[__YEVEN:%.*]] = shl <2 x i32> [[TMP1]], splat (i32 31)2446; CHECK-NEXT: [[TMP2:%.*]] = bitcast <2 x float> [[X]] to <2 x i32>2447; CHECK-NEXT: [[__POW_SIGN:%.*]] = and <2 x i32> [[__YEVEN]], [[TMP2]]2448; CHECK-NEXT: [[TMP3:%.*]] = bitcast <2 x float> [[__EXP2]] to <2 x i32>2449; CHECK-NEXT: [[TMP4:%.*]] = or disjoint <2 x i32> [[__POW_SIGN]], [[TMP3]]2450; CHECK-NEXT: [[TMP5:%.*]] = bitcast <2 x i32> [[TMP4]] to <2 x float>2451; CHECK-NEXT: ret <2 x float> [[TMP5]]2452;2453 %y.cast = uitofp <2 x i32> %y to <2 x float>2454 %pow = tail call afn nnan ninf <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> %y.cast)2455 ret <2 x float> %pow2456}2457 2458; Could fold to powr or pown2459define float @test_pow_f32_known_positive_x__known_integral_sitofp(float nofpclass(ninf nsub nnorm) %x, i32 %y) {2460; CHECK-LABEL: define float @test_pow_f32_known_positive_x__known_integral_sitofp2461; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]], i32 [[Y:%.*]]) {2462; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i32 [[Y]] to float2463; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4powrff(float [[X]], float [[Y_CAST]])2464; CHECK-NEXT: ret float [[POW]]2465;2466 %y.cast = sitofp i32 %y to float2467 %pow = tail call float @_Z3powff(float %x, float %y.cast)2468 ret float %pow2469}2470 2471define float @test_pow_afn_f32_known_positive_x__known_integral_sitofp(float nofpclass(ninf nsub nnorm) %x, i32 %y) {2472; CHECK-LABEL: define float @test_pow_afn_f32_known_positive_x__known_integral_sitofp2473; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]], i32 [[Y:%.*]]) {2474; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i32 [[Y]] to float2475; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4powrff(float [[X]], float [[Y_CAST]])2476; CHECK-NEXT: ret float [[POW]]2477;2478 %y.cast = sitofp i32 %y to float2479 %pow = tail call afn float @_Z3powff(float %x, float %y.cast)2480 ret float %pow2481}2482 2483define float @test_pow_afn_nnan_ninf_f32__known_positive_x__known_integral_sitofp(float nofpclass(ninf nsub nnorm) %x, i32 %y) {2484; CHECK-LABEL: define float @test_pow_afn_nnan_ninf_f32__known_positive_x__known_integral_sitofp2485; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]], i32 [[Y:%.*]]) {2486; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i32 [[Y]] to float2487; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn float @llvm.log2.f32(float [[X]])2488; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn float [[__LOG2]], [[Y_CAST]]2489; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn float @llvm.exp2.f32(float [[__YLOGX]])2490; CHECK-NEXT: ret float [[__EXP2]]2491;2492 %y.cast = sitofp i32 %y to float2493 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float %y.cast)2494 ret float %pow2495}2496 2497define float @test_pow_f32__y_known_integral_trunc_maybe_inf(float %x, float nofpclass(nan) %y.arg) {2498; CHECK-LABEL: define float @test_pow_f32__y_known_integral_trunc_maybe_inf2499; CHECK-SAME: (float [[X:%.*]], float nofpclass(nan) [[Y_ARG:%.*]]) {2500; CHECK-NEXT: [[Y:%.*]] = call float @llvm.trunc.f32(float [[Y_ARG]])2501; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z3powff(float [[X]], float [[Y]])2502; CHECK-NEXT: ret float [[POW]]2503;2504 %y = call float @llvm.trunc.f32(float %y.arg)2505 %pow = tail call float @_Z3powff(float %x, float %y)2506 ret float %pow2507}2508 2509define float @test_pow_f32__y_known_integral_trunc_maybe_nan(float %x, float nofpclass(inf) %y.arg) {2510; CHECK-LABEL: define float @test_pow_f32__y_known_integral_trunc_maybe_nan2511; CHECK-SAME: (float [[X:%.*]], float nofpclass(inf) [[Y_ARG:%.*]]) {2512; CHECK-NEXT: [[Y:%.*]] = call float @llvm.trunc.f32(float [[Y_ARG]])2513; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z3powff(float [[X]], float [[Y]])2514; CHECK-NEXT: ret float [[POW]]2515;2516 %y = call float @llvm.trunc.f32(float %y.arg)2517 %pow = tail call float @_Z3powff(float %x, float %y)2518 ret float %pow2519}2520 2521; Cannot fold to pown, may still be inf2522define float @test_pow_f32__y_known_integral_trunc_nnan_use(float %x, float %y.arg) {2523; CHECK-LABEL: define float @test_pow_f32__y_known_integral_trunc_nnan_use2524; CHECK-SAME: (float [[X:%.*]], float [[Y_ARG:%.*]]) {2525; CHECK-NEXT: [[Y:%.*]] = call float @llvm.trunc.f32(float [[Y_ARG]])2526; CHECK-NEXT: [[POW:%.*]] = tail call nnan float @_Z3powff(float [[X]], float [[Y]])2527; CHECK-NEXT: ret float [[POW]]2528;2529 %y = call float @llvm.trunc.f32(float %y.arg)2530 %pow = tail call nnan float @_Z3powff(float %x, float %y)2531 ret float %pow2532}2533 2534; Cannot fold to pown, may still be nan2535define float @test_pow_f32__y_known_integral_trunc_ninf_use(float %x, float %y.arg) {2536; CHECK-LABEL: define float @test_pow_f32__y_known_integral_trunc_ninf_use2537; CHECK-SAME: (float [[X:%.*]], float [[Y_ARG:%.*]]) {2538; CHECK-NEXT: [[Y:%.*]] = call float @llvm.trunc.f32(float [[Y_ARG]])2539; CHECK-NEXT: [[POW:%.*]] = tail call ninf float @_Z3powff(float [[X]], float [[Y]])2540; CHECK-NEXT: ret float [[POW]]2541;2542 %y = call float @llvm.trunc.f32(float %y.arg)2543 %pow = tail call ninf float @_Z3powff(float %x, float %y)2544 ret float %pow2545}2546 2547define float @test_pow_afn_f32_nnan_ninf__y_known_integral_trunc(float %x, float %y.arg) {2548; CHECK-LABEL: define float @test_pow_afn_f32_nnan_ninf__y_known_integral_trunc2549; CHECK-SAME: (float [[X:%.*]], float [[Y_ARG:%.*]]) {2550; CHECK-NEXT: [[Y:%.*]] = call float @llvm.trunc.f32(float [[Y_ARG]])2551; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y]] to i322552; CHECK-NEXT: [[__FABS:%.*]] = call nnan ninf afn float @llvm.fabs.f32(float [[X]])2553; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn float @llvm.log2.f32(float [[__FABS]])2554; CHECK-NEXT: [[POWNI2F:%.*]] = sitofp i32 [[TMP1]] to float2555; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn float [[__LOG2]], [[POWNI2F]]2556; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn float @llvm.exp2.f32(float [[__YLOGX]])2557; CHECK-NEXT: [[__YEVEN:%.*]] = shl i32 [[TMP1]], 312558; CHECK-NEXT: [[TMP2:%.*]] = bitcast float [[X]] to i322559; CHECK-NEXT: [[__POW_SIGN:%.*]] = and i32 [[__YEVEN]], [[TMP2]]2560; CHECK-NEXT: [[TMP3:%.*]] = bitcast float [[__EXP2]] to i322561; CHECK-NEXT: [[TMP4:%.*]] = or disjoint i32 [[__POW_SIGN]], [[TMP3]]2562; CHECK-NEXT: [[TMP5:%.*]] = bitcast i32 [[TMP4]] to float2563; CHECK-NEXT: ret float [[TMP5]]2564;2565 %y = call float @llvm.trunc.f32(float %y.arg)2566 %pow = tail call afn nnan ninf float @_Z3powff(float %x, float %y)2567 ret float %pow2568}2569 2570define float @test_pow_afn_f32__y_known_integral_trunc(float %x, float nofpclass(inf nan) %y.arg) {2571; CHECK-LABEL: define float @test_pow_afn_f32__y_known_integral_trunc2572; CHECK-SAME: (float [[X:%.*]], float nofpclass(nan inf) [[Y_ARG:%.*]]) {2573; CHECK-NEXT: [[Y:%.*]] = call float @llvm.trunc.f32(float [[Y_ARG]])2574; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y]] to i322575; CHECK-NEXT: [[POW:%.*]] = tail call afn float @_Z4pownfi(float [[X]], i32 [[TMP1]])2576; CHECK-NEXT: ret float [[POW]]2577;2578 %y = call float @llvm.trunc.f32(float %y.arg)2579 %pow = tail call afn float @_Z3powff(float %x, float %y)2580 ret float %pow2581}2582 2583define float @test_pow_f32__y_known_integral_floor(float %x, float nofpclass(inf nan) %y.arg) {2584; CHECK-LABEL: define float @test_pow_f32__y_known_integral_floor2585; CHECK-SAME: (float [[X:%.*]], float nofpclass(nan inf) [[Y_ARG:%.*]]) {2586; CHECK-NEXT: [[Y:%.*]] = call float @llvm.floor.f32(float [[Y_ARG]])2587; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y]] to i322588; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 [[TMP1]])2589; CHECK-NEXT: ret float [[POW]]2590;2591 %y = call float @llvm.floor.f32(float %y.arg)2592 %pow = tail call float @_Z3powff(float %x, float %y)2593 ret float %pow2594}2595 2596define float @test_pow_f32__y_known_integral_ceil(float %x, float nofpclass(inf nan) %y.arg) {2597; CHECK-LABEL: define float @test_pow_f32__y_known_integral_ceil2598; CHECK-SAME: (float [[X:%.*]], float nofpclass(nan inf) [[Y_ARG:%.*]]) {2599; CHECK-NEXT: [[Y:%.*]] = call float @llvm.floor.f32(float [[Y_ARG]])2600; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y]] to i322601; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 [[TMP1]])2602; CHECK-NEXT: ret float [[POW]]2603;2604 %y = call float @llvm.floor.f32(float %y.arg)2605 %pow = tail call float @_Z3powff(float %x, float %y)2606 ret float %pow2607}2608 2609define float @test_pow_f32__y_known_integral_trunc(float %x, float nofpclass(inf nan) %y.arg) {2610; CHECK-LABEL: define float @test_pow_f32__y_known_integral_trunc2611; CHECK-SAME: (float [[X:%.*]], float nofpclass(nan inf) [[Y_ARG:%.*]]) {2612; CHECK-NEXT: [[Y:%.*]] = call float @llvm.trunc.f32(float [[Y_ARG]])2613; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y]] to i322614; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 [[TMP1]])2615; CHECK-NEXT: ret float [[POW]]2616;2617 %y = call float @llvm.trunc.f32(float %y.arg)2618 %pow = tail call float @_Z3powff(float %x, float %y)2619 ret float %pow2620}2621 2622define float @test_pow_f32__y_known_integral_rint(float %x, float nofpclass(inf nan) %y.arg) {2623; CHECK-LABEL: define float @test_pow_f32__y_known_integral_rint2624; CHECK-SAME: (float [[X:%.*]], float nofpclass(nan inf) [[Y_ARG:%.*]]) {2625; CHECK-NEXT: [[Y:%.*]] = call float @llvm.rint.f32(float [[Y_ARG]])2626; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y]] to i322627; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 [[TMP1]])2628; CHECK-NEXT: ret float [[POW]]2629;2630 %y = call float @llvm.rint.f32(float %y.arg)2631 %pow = tail call float @_Z3powff(float %x, float %y)2632 ret float %pow2633}2634 2635define float @test_pow_f32__y_known_integral_nearbyint(float %x, float nofpclass(inf nan) %y.arg) {2636; CHECK-LABEL: define float @test_pow_f32__y_known_integral_nearbyint2637; CHECK-SAME: (float [[X:%.*]], float nofpclass(nan inf) [[Y_ARG:%.*]]) {2638; CHECK-NEXT: [[Y:%.*]] = call float @llvm.nearbyint.f32(float [[Y_ARG]])2639; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y]] to i322640; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 [[TMP1]])2641; CHECK-NEXT: ret float [[POW]]2642;2643 %y = call float @llvm.nearbyint.f32(float %y.arg)2644 %pow = tail call float @_Z3powff(float %x, float %y)2645 ret float %pow2646}2647 2648define float @test_pow_f32__y_known_integral_round(float %x, float nofpclass(inf nan) %y.arg) {2649; CHECK-LABEL: define float @test_pow_f32__y_known_integral_round2650; CHECK-SAME: (float [[X:%.*]], float nofpclass(nan inf) [[Y_ARG:%.*]]) {2651; CHECK-NEXT: [[Y:%.*]] = call float @llvm.round.f32(float [[Y_ARG]])2652; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y]] to i322653; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 [[TMP1]])2654; CHECK-NEXT: ret float [[POW]]2655;2656 %y = call float @llvm.round.f32(float %y.arg)2657 %pow = tail call float @_Z3powff(float %x, float %y)2658 ret float %pow2659}2660 2661define float @test_pow_f32__y_known_integral_roundeven(float %x, float nofpclass(inf nan) %y.arg) {2662; CHECK-LABEL: define float @test_pow_f32__y_known_integral_roundeven2663; CHECK-SAME: (float [[X:%.*]], float nofpclass(nan inf) [[Y_ARG:%.*]]) {2664; CHECK-NEXT: [[Y:%.*]] = call float @llvm.roundeven.f32(float [[Y_ARG]])2665; CHECK-NEXT: [[TMP1:%.*]] = fptosi float [[Y]] to i322666; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 [[TMP1]])2667; CHECK-NEXT: ret float [[POW]]2668;2669 %y = call float @llvm.roundeven.f32(float %y.arg)2670 %pow = tail call float @_Z3powff(float %x, float %y)2671 ret float %pow2672}2673 2674define float @test_pow_f32_known_integral_undef(float %x) {2675; CHECK-LABEL: define float @test_pow_f32_known_integral_undef2676; CHECK-SAME: (float [[X:%.*]]) {2677; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z3powff(float [[X]], float undef)2678; CHECK-NEXT: ret float [[POW]]2679;2680 %pow = tail call float @_Z3powff(float %x, float undef)2681 ret float %pow2682}2683 2684define float @test_pow_f32_known_integral_poison(float %x) {2685; CHECK-LABEL: define float @test_pow_f32_known_integral_poison2686; CHECK-SAME: (float [[X:%.*]]) {2687; CHECK-NEXT: [[POW:%.*]] = tail call float @_Z4pownfi(float [[X]], i32 poison)2688; CHECK-NEXT: ret float [[POW]]2689;2690 %pow = tail call float @_Z3powff(float %x, float poison)2691 ret float %pow2692}2693 2694define <2 x float> @test_pow_v2f32_known_integral_constant_vector_undef_elt(<2 x float> %x) {2695; CHECK-LABEL: define <2 x float> @test_pow_v2f32_known_integral_constant_vector_undef_elt2696; CHECK-SAME: (<2 x float> [[X:%.*]]) {2697; CHECK-NEXT: [[POW:%.*]] = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> [[X]], <2 x float> <float 4.000000e+00, float undef>)2698; CHECK-NEXT: ret <2 x float> [[POW]]2699;2700 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 4.0, float undef>)2701 ret <2 x float> %pow2702}2703 2704define <2 x float> @test_pow_v2f32_known_integral_constant_vector_poison_elt(<2 x float> %x) {2705; CHECK-LABEL: define <2 x float> @test_pow_v2f32_known_integral_constant_vector_poison_elt2706; CHECK-SAME: (<2 x float> [[X:%.*]]) {2707; CHECK-NEXT: [[POW:%.*]] = tail call <2 x float> @_Z4pownDv2_fDv2_i(<2 x float> [[X]], <2 x i32> <i32 4, i32 poison>)2708; CHECK-NEXT: ret <2 x float> [[POW]]2709;2710 %pow = tail call <2 x float> @_Z3powDv2_fS_(<2 x float> %x, <2 x float> <float 4.0, float poison>)2711 ret <2 x float> %pow2712}2713 2714attributes #0 = { minsize }2715attributes #1 = { noinline }2716attributes #2 = { strictfp }2717attributes #3 = { nobuiltin }2718