brintos

brintos / llvm-project-archived public Read only

0
0
Text · 14.5 KiB · 1d59907 Raw
295 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 22; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT3 4declare float @llvm.powi.f32.i32(float, i32)5declare float @llvm.powi.f32.i64(float, i64)6 7declare <2 x float> @llvm.powi.v2f32.v2i32(<2 x float>, <2 x i32>)8declare <4 x float> @llvm.powi.v4f32.i32(<4 x float>, i32)9 10define float @ret_powi_f32(float %arg0, i32 %arg1) #0 {11; CHECK-LABEL: define float @ret_powi_f3212; CHECK-SAME: (float [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1:[0-9]+]] {13; CHECK-NEXT:    [[CALL:%.*]] = call float @llvm.powi.f32.i32(float [[ARG0]], i32 [[ARG1]]) #[[ATTR6:[0-9]+]]14; CHECK-NEXT:    ret float [[CALL]]15;16  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)17  ret float %call18}19 20define float @ret_powi_f32_i64(float %arg0, i64 %arg1) #0 {21; CHECK-LABEL: define float @ret_powi_f32_i6422; CHECK-SAME: (float [[ARG0:%.*]], i64 [[ARG1:%.*]]) #[[ATTR1]] {23; CHECK-NEXT:    [[CALL:%.*]] = call float @llvm.powi.f32.i64(float [[ARG0]], i64 [[ARG1]]) #[[ATTR6]]24; CHECK-NEXT:    ret float [[CALL]]25;26  %call = call float @llvm.powi.f32.i64(float %arg0, i64 %arg1)27  ret float %call28}29 30define <2 x float> @ret_powi_v2f32(<2 x float> %arg0, <2 x i32> %arg1) #0 {31; CHECK-LABEL: define <2 x float> @ret_powi_v2f3232; CHECK-SAME: (<2 x float> [[ARG0:%.*]], <2 x i32> [[ARG1:%.*]]) #[[ATTR1]] {33; CHECK-NEXT:    [[CALL:%.*]] = call <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> [[ARG0]], <2 x i32> [[ARG1]]) #[[ATTR6]]34; CHECK-NEXT:    ret <2 x float> [[CALL]]35;36  %call = call <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> %arg0, <2 x i32> %arg1)37  ret <2 x float> %call38}39 40define float @ret_powi_f32_odd_constant(float %arg0) #0 {41; CHECK-LABEL: define float @ret_powi_f32_odd_constant42; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {43; CHECK-NEXT:    [[CALL:%.*]] = call float @llvm.powi.f32.i32(float [[ARG0]], i32 noundef 3) #[[ATTR6]]44; CHECK-NEXT:    ret float [[CALL]]45;46  %call = call float @llvm.powi.f32.i32(float %arg0, i32 3)47  ret float %call48}49 50define float @ret_powi_f32_even_constant(float %arg0) #0 {51; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_even_constant52; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1]] {53; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float [[ARG0]], i32 noundef 4) #[[ATTR6]]54; CHECK-NEXT:    ret float [[CALL]]55;56  %call = call float @llvm.powi.f32.i32(float %arg0, i32 4)57  ret float %call58}59 60define <2 x float> @ret_powi_v2f32_even_nonsplat(<2 x float> %arg0) #0 {61; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) <2 x float> @ret_powi_v2f32_even_nonsplat62; CHECK-SAME: (<2 x float> [[ARG0:%.*]]) #[[ATTR1]] {63; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> [[ARG0]], <2 x i32> noundef <i32 2, i32 4>) #[[ATTR6]]64; CHECK-NEXT:    ret <2 x float> [[CALL]]65;66  %call = call <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> %arg0, <2 x i32> <i32 2, i32 4>)67  ret <2 x float> %call68}69 70define <2 x float> @ret_powi_v2f32_odd_nonsplat(<2 x float> %arg0) #0 {71; CHECK-LABEL: define <2 x float> @ret_powi_v2f32_odd_nonsplat72; CHECK-SAME: (<2 x float> [[ARG0:%.*]]) #[[ATTR1]] {73; CHECK-NEXT:    [[CALL:%.*]] = call <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> [[ARG0]], <2 x i32> noundef <i32 3, i32 4>) #[[ATTR6]]74; CHECK-NEXT:    ret <2 x float> [[CALL]]75;76  %call = call <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> %arg0, <2 x i32> <i32 3, i32 4>)77  ret <2 x float> %call78}79 80define float @ret_powi_f32_masked_to_even(float %arg0, i32 %arg1) #0 {81; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_masked_to_even82; CHECK-SAME: (float [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {83; CHECK-NEXT:    [[KNOWN_EVEN:%.*]] = and i32 [[ARG1]], -284; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float [[ARG0]], i32 [[KNOWN_EVEN]]) #[[ATTR6]]85; CHECK-NEXT:    ret float [[CALL]]86;87  %known.even = and i32 %arg1, -288  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %known.even)89  ret float %call90}91 92define float @ret_powi_f32_masked_to_even_extrabits(float %arg0, i32 %arg1) #0 {93; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_masked_to_even_extrabits94; CHECK-SAME: (float [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {95; CHECK-NEXT:    [[KNOWN_EVEN:%.*]] = and i32 [[ARG1]], -496; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float [[ARG0]], i32 [[KNOWN_EVEN]]) #[[ATTR6]]97; CHECK-NEXT:    ret float [[CALL]]98;99  %known.even = and i32 %arg1, -4100  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %known.even)101  ret float %call102}103 104define <2 x float> @ret_powi_v2f32_masked_to_even(<2 x float> %arg0, <2 x i32> %arg1) #0 {105; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) <2 x float> @ret_powi_v2f32_masked_to_even106; CHECK-SAME: (<2 x float> [[ARG0:%.*]], <2 x i32> [[ARG1:%.*]]) #[[ATTR1]] {107; CHECK-NEXT:    [[KNOWN_EVEN:%.*]] = and <2 x i32> [[ARG1]], splat (i32 -2)108; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> [[ARG0]], <2 x i32> [[KNOWN_EVEN]]) #[[ATTR6]]109; CHECK-NEXT:    ret <2 x float> [[CALL]]110;111  %known.even = and <2 x i32> %arg1, <i32 -2, i32 -2>112  %call = call <2 x float> @llvm.powi.v2f32.v2i32(<2 x float> %arg0, <2 x i32> %known.even)113  ret <2 x float> %call114}115 116define float @ret_powi_f32_noneg(float nofpclass(ninf nsub nnorm) %arg0, i32 %arg1) #0 {117; CHECK-LABEL: define float @ret_powi_f32_noneg118; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {119; CHECK-NEXT:    [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(ninf nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]120; CHECK-NEXT:    ret float [[CALL]]121;122  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)123  ret float %call124}125 126define float @ret_powi_f32_noneg_nonzero(float nofpclass(ninf nsub nnorm nzero) %arg0, i32 %arg1) #0 {127; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_noneg_nonzero128; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {129; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]130; CHECK-NEXT:    ret float [[CALL]]131;132  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)133  ret float %call134}135 136define float @ret_powi_f32_noneg_nozero(float nofpclass(ninf nsub nnorm) %arg0, i32 %arg1) #0 {137; CHECK-LABEL: define float @ret_powi_f32_noneg_nozero138; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {139; CHECK-NEXT:    [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(ninf nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]140; CHECK-NEXT:    ret float [[CALL]]141;142  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)143  ret float %call144}145 146define float @ret_powi_f32_nonzero(float nofpclass(nzero) %arg0, i32 %arg1) #0 {147; CHECK-LABEL: define float @ret_powi_f32_nonzero148; CHECK-SAME: (float nofpclass(nzero) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {149; CHECK-NEXT:    [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(nzero) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]150; CHECK-NEXT:    ret float [[CALL]]151;152  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)153  ret float %call154}155 156define float @ret_powi_f32_nopzero(float nofpclass(pzero) %arg0, i32 %arg1) #0 {157; CHECK-LABEL: define float @ret_powi_f32_nopzero158; CHECK-SAME: (float nofpclass(pzero) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {159; CHECK-NEXT:    [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(pzero) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]160; CHECK-NEXT:    ret float [[CALL]]161;162  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)163  ret float %call164}165 166define float @ret_powi_f32_noneg_ftz_daz(float nofpclass(ninf nsub nnorm) %arg0, i32 %arg1) #1 {167; CHECK-LABEL: define float @ret_powi_f32_noneg_ftz_daz168; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2:[0-9]+]] {169; CHECK-NEXT:    [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(ninf nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]170; CHECK-NEXT:    ret float [[CALL]]171;172  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)173  ret float %call174}175 176define float @ret_powi_f32_noneg_nonzero_ftz_daz(float nofpclass(ninf nsub nnorm nzero) %arg0, i32 %arg1) #1 {177; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_noneg_nonzero_ftz_daz178; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {179; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]180; CHECK-NEXT:    ret float [[CALL]]181;182  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)183  ret float %call184}185 186define float @ret_powi_f32_noneg_nonzero_ftpz_dapz(float nofpclass(ninf nsub nnorm nzero) %arg0, i32 %arg1) #2 {187; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_noneg_nonzero_ftpz_dapz188; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR3:[0-9]+]] {189; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]190; CHECK-NEXT:    ret float [[CALL]]191;192  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)193  ret float %call194}195 196define float @ret_powi_f32_noninf_nonnorm(float nofpclass(ninf nnorm) %arg0, i32 %arg1) #0 {197; CHECK-LABEL: define float @ret_powi_f32_noninf_nonnorm198; CHECK-SAME: (float nofpclass(ninf nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR1]] {199; CHECK-NEXT:    [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(ninf nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]200; CHECK-NEXT:    ret float [[CALL]]201;202  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)203  ret float %call204}205 206define float @ret_powi_f32_noninf_nonnorm_ftz_daz(float nofpclass(ninf nnorm) %arg0, i32 %arg1) #1 {207; CHECK-LABEL: define float @ret_powi_f32_noninf_nonnorm_ftz_daz208; CHECK-SAME: (float nofpclass(ninf nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR2]] {209; CHECK-NEXT:    [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(ninf nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]210; CHECK-NEXT:    ret float [[CALL]]211;212  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)213  ret float %call214}215 216define float @ret_powi_f32_noneg_ftz_ieee(float nofpclass(ninf nsub nnorm) %arg0, i32 %arg1) #3 {217; CHECK-LABEL: define float @ret_powi_f32_noneg_ftz_ieee218; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR4:[0-9]+]] {219; CHECK-NEXT:    [[CALL:%.*]] = call float @llvm.powi.f32.i32(float nofpclass(ninf nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]220; CHECK-NEXT:    ret float [[CALL]]221;222  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)223  ret float %call224}225 226define float @ret_powi_f32_noneg_nonzero_ftz_ieee(float nofpclass(ninf nsub nnorm nzero) %arg0, i32 %arg1) #3 {227; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) float @ret_powi_f32_noneg_nonzero_ftz_ieee228; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR4]] {229; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf nzero nsub nnorm) float @llvm.powi.f32.i32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]230; CHECK-NEXT:    ret float [[CALL]]231;232  %call = call float @llvm.powi.f32.i32(float %arg0, i32 %arg1)233  ret float %call234}235 236define <4 x float> @powi_v4f32_i32(<4 x float> %arg0, i32 %arg1) {237; CHECK-LABEL: define <4 x float> @powi_v4f32_i32238; CHECK-SAME: (<4 x float> [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR5:[0-9]+]] {239; CHECK-NEXT:    [[POWI:%.*]] = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]240; CHECK-NEXT:    ret <4 x float> [[POWI]]241;242  %powi = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> %arg0, i32 %arg1)243  ret <4 x float> %powi244}245 246define <4 x float> @powi_v4f32_i32_nozero(<4 x float> nofpclass(zero) %arg0, i32 %arg1) {247; CHECK-LABEL: define <4 x float> @powi_v4f32_i32_nozero248; CHECK-SAME: (<4 x float> nofpclass(zero) [[ARG0:%.*]], i32 [[ARG1:%.*]]) #[[ATTR5]] {249; CHECK-NEXT:    [[POWI:%.*]] = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> nofpclass(zero) [[ARG0]], i32 [[ARG1]]) #[[ATTR6]]250; CHECK-NEXT:    ret <4 x float> [[POWI]]251;252  %powi = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> %arg0, i32 %arg1)253  ret <4 x float> %powi254}255 256define <4 x float> @powi_v4f32_i32_constint_even(<4 x float> %arg) {257; CHECK-LABEL: define nofpclass(ninf nzero nsub nnorm) <4 x float> @powi_v4f32_i32_constint_even258; CHECK-SAME: (<4 x float> [[ARG:%.*]]) #[[ATTR5]] {259; CHECK-NEXT:    [[POWI:%.*]] = call nofpclass(ninf nzero nsub nnorm) <4 x float> @llvm.powi.v4f32.i32(<4 x float> [[ARG]], i32 noundef 4) #[[ATTR6]]260; CHECK-NEXT:    ret <4 x float> [[POWI]]261;262  %powi = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> %arg, i32 4)263  ret <4 x float> %powi264}265 266define <4 x float> @powi_v4f32_i32_constint_odd(<4 x float> %arg) {267; CHECK-LABEL: define <4 x float> @powi_v4f32_i32_constint_odd268; CHECK-SAME: (<4 x float> [[ARG:%.*]]) #[[ATTR5]] {269; CHECK-NEXT:    [[POWI:%.*]] = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> [[ARG]], i32 noundef 3) #[[ATTR6]]270; CHECK-NEXT:    ret <4 x float> [[POWI]]271;272  %powi = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> %arg, i32 3)273  ret <4 x float> %powi274}275 276define <4 x float> @powi_v4f32_i32_regression(<4 x float> %arg) {277; CHECK-LABEL: define nofpclass(nzero) <4 x float> @powi_v4f32_i32_regression278; CHECK-SAME: (<4 x float> [[ARG:%.*]]) #[[ATTR5]] {279; CHECK-NEXT:    [[POWI:%.*]] = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> [[ARG]], i32 noundef 4) #[[ATTR6]]280; CHECK-NEXT:    [[USER:%.*]] = fsub <4 x float> [[POWI]], splat (float 1.000000e+00)281; CHECK-NEXT:    ret <4 x float> [[USER]]282;283  %powi = call <4 x float> @llvm.powi.v4f32.i32(<4 x float> %arg, i32 4)284  %user = fsub <4 x float> %powi, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>285  ret <4 x float> %user286}287 288attributes #0 = { "denormal-fp-math"="ieee,ieee" }289attributes #1 = { "denormal-fp-math"="preserve-sign,preserve-sign" }290attributes #2 = { "denormal-fp-math"="positive-zero,positive-zero" }291attributes #3 = { "denormal-fp-math"="preserve-sign,ieee" }292 293;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:294; TUNIT: {{.*}}295