brintos

brintos / llvm-project-archived public Read only

0
0
Text · 15.3 KiB · e1b829b Raw
349 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.rint.f32(float)5declare ppc_fp128 @llvm.rint.ppcf128(ppc_fp128)6 7define float @ret_rint(float %arg0) {8; CHECK-LABEL: define nofpclass(sub) float @ret_rint9; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] {10; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]]11; CHECK-NEXT:    ret float [[CALL]]12;13  %call = call float @llvm.rint.f32(float %arg0)14  ret float %call15}16 17define float @ret_rint_noinf(float nofpclass(inf) %arg0) {18; CHECK-LABEL: define nofpclass(inf sub) float @ret_rint_noinf19; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] {20; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(inf sub) float @llvm.rint.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR2]]21; CHECK-NEXT:    ret float [[CALL]]22;23  %call = call float @llvm.rint.f32(float %arg0)24  ret float %call25}26 27define float @ret_rint_nopinf(float nofpclass(pinf) %arg0) {28; CHECK-LABEL: define nofpclass(pinf sub) float @ret_rint_nopinf29; CHECK-SAME: (float nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] {30; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.rint.f32(float nofpclass(pinf) [[ARG0]]) #[[ATTR2]]31; CHECK-NEXT:    ret float [[CALL]]32;33  %call = call float @llvm.rint.f32(float %arg0)34  ret float %call35}36 37define float @ret_rint_noninf(float nofpclass(ninf) %arg0) {38; CHECK-LABEL: define nofpclass(ninf sub) float @ret_rint_noninf39; CHECK-SAME: (float nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] {40; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.rint.f32(float nofpclass(ninf) [[ARG0]]) #[[ATTR2]]41; CHECK-NEXT:    ret float [[CALL]]42;43  %call = call float @llvm.rint.f32(float %arg0)44  ret float %call45}46 47define float @ret_rint_nonan(float nofpclass(nan) %arg0) {48; CHECK-LABEL: define nofpclass(nan sub) float @ret_rint_nonan49; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] {50; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(nan sub) float @llvm.rint.f32(float nofpclass(nan) [[ARG0]]) #[[ATTR2]]51; CHECK-NEXT:    ret float [[CALL]]52;53  %call = call float @llvm.rint.f32(float %arg0)54  ret float %call55}56 57define float @ret_rint_noqnan(float nofpclass(qnan) %arg0) {58; CHECK-LABEL: define nofpclass(sub) float @ret_rint_noqnan59; CHECK-SAME: (float nofpclass(qnan) [[ARG0:%.*]]) #[[ATTR1]] {60; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float nofpclass(qnan) [[ARG0]]) #[[ATTR2]]61; CHECK-NEXT:    ret float [[CALL]]62;63  %call = call float @llvm.rint.f32(float %arg0)64  ret float %call65}66 67define float @ret_rint_nosnan(float nofpclass(snan) %arg0) {68; CHECK-LABEL: define nofpclass(snan sub) float @ret_rint_nosnan69; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] {70; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(snan sub) float @llvm.rint.f32(float nofpclass(snan) [[ARG0]]) #[[ATTR2]]71; CHECK-NEXT:    ret float [[CALL]]72;73  %call = call float @llvm.rint.f32(float %arg0)74  ret float %call75}76 77define float @ret_rint_nozero(float nofpclass(zero) %arg0) {78; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nozero79; CHECK-SAME: (float nofpclass(zero) [[ARG0:%.*]]) #[[ATTR1]] {80; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float nofpclass(zero) [[ARG0]]) #[[ATTR2]]81; CHECK-NEXT:    ret float [[CALL]]82;83  %call = call float @llvm.rint.f32(float %arg0)84  ret float %call85}86 87define float @ret_rint_nopzero(float nofpclass(pzero) %arg0) {88; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nopzero89; CHECK-SAME: (float nofpclass(pzero) [[ARG0:%.*]]) #[[ATTR1]] {90; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float nofpclass(pzero) [[ARG0]]) #[[ATTR2]]91; CHECK-NEXT:    ret float [[CALL]]92;93  %call = call float @llvm.rint.f32(float %arg0)94  ret float %call95}96 97define float @ret_rint_nonzero(float nofpclass(nzero) %arg0) {98; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nonzero99; CHECK-SAME: (float nofpclass(nzero) [[ARG0:%.*]]) #[[ATTR1]] {100; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float nofpclass(nzero) [[ARG0]]) #[[ATTR2]]101; CHECK-NEXT:    ret float [[CALL]]102;103  %call = call float @llvm.rint.f32(float %arg0)104  ret float %call105}106 107define float @ret_rint_nonorm(float nofpclass(norm) %arg0) {108; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nonorm109; CHECK-SAME: (float nofpclass(norm) [[ARG0:%.*]]) #[[ATTR1]] {110; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float nofpclass(norm) [[ARG0]]) #[[ATTR2]]111; CHECK-NEXT:    ret float [[CALL]]112;113  %call = call float @llvm.rint.f32(float %arg0)114  ret float %call115}116 117define float @ret_rint_nonnorm(float nofpclass(nnorm) %arg0) {118; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nonnorm119; CHECK-SAME: (float nofpclass(nnorm) [[ARG0:%.*]]) #[[ATTR1]] {120; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float nofpclass(nnorm) [[ARG0]]) #[[ATTR2]]121; CHECK-NEXT:    ret float [[CALL]]122;123  %call = call float @llvm.rint.f32(float %arg0)124  ret float %call125}126 127define float @ret_rint_nopnorm(float nofpclass(pnorm) %arg0) {128; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nopnorm129; CHECK-SAME: (float nofpclass(pnorm) [[ARG0:%.*]]) #[[ATTR1]] {130; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float nofpclass(pnorm) [[ARG0]]) #[[ATTR2]]131; CHECK-NEXT:    ret float [[CALL]]132;133  %call = call float @llvm.rint.f32(float %arg0)134  ret float %call135}136 137define float @ret_rint_nonsub(float nofpclass(nsub) %arg0) {138; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nonsub139; CHECK-SAME: (float nofpclass(nsub) [[ARG0:%.*]]) #[[ATTR1]] {140; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float nofpclass(nsub) [[ARG0]]) #[[ATTR2]]141; CHECK-NEXT:    ret float [[CALL]]142;143  %call = call float @llvm.rint.f32(float %arg0)144  ret float %call145}146 147define float @ret_rint_nopsub(float nofpclass(psub) %arg0) {148; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nopsub149; CHECK-SAME: (float nofpclass(psub) [[ARG0:%.*]]) #[[ATTR1]] {150; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float nofpclass(psub) [[ARG0]]) #[[ATTR2]]151; CHECK-NEXT:    ret float [[CALL]]152;153  %call = call float @llvm.rint.f32(float %arg0)154  ret float %call155}156 157define float @ret_rint_nonorm_nosub(float nofpclass(norm sub) %arg0) {158; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nonorm_nosub159; CHECK-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] {160; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float nofpclass(sub norm) [[ARG0]]) #[[ATTR2]]161; CHECK-NEXT:    ret float [[CALL]]162;163  %call = call float @llvm.rint.f32(float %arg0)164  ret float %call165}166 167define float @ret_rint_nopnorm_nopsub(float nofpclass(pnorm psub) %arg0) {168; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nopnorm_nopsub169; CHECK-SAME: (float nofpclass(psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {170; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float nofpclass(psub pnorm) [[ARG0]]) #[[ATTR2]]171; CHECK-NEXT:    ret float [[CALL]]172;173  %call = call float @llvm.rint.f32(float %arg0)174  ret float %call175}176 177define float @ret_rint_nonnorm_nonsub(float nofpclass(nnorm nsub) %arg0) {178; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nonnorm_nonsub179; CHECK-SAME: (float nofpclass(nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {180; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float nofpclass(nsub nnorm) [[ARG0]]) #[[ATTR2]]181; CHECK-NEXT:    ret float [[CALL]]182;183  %call = call float @llvm.rint.f32(float %arg0)184  ret float %call185}186 187define float @ret_rint_nopnorm_nonsub(float nofpclass(pnorm nsub) %arg0) {188; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nopnorm_nonsub189; CHECK-SAME: (float nofpclass(nsub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {190; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float nofpclass(nsub pnorm) [[ARG0]]) #[[ATTR2]]191; CHECK-NEXT:    ret float [[CALL]]192;193  %call = call float @llvm.rint.f32(float %arg0)194  ret float %call195}196 197define ppc_fp128 @ret_rint_ppcf128(ppc_fp128 %arg0) {198; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_rint_ppcf128199; CHECK-SAME: (ppc_fp128 [[ARG0:%.*]]) #[[ATTR1]] {200; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]]201; CHECK-NEXT:    ret ppc_fp128 [[CALL]]202;203  %call = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 %arg0)204  ret ppc_fp128 %call205}206 207define ppc_fp128 @ret_rint_noinf_ppcf128(ppc_fp128 nofpclass(inf) %arg0) {208; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_rint_noinf_ppcf128209; CHECK-SAME: (ppc_fp128 nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] {210; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 nofpclass(inf) [[ARG0]]) #[[ATTR2]]211; CHECK-NEXT:    ret ppc_fp128 [[CALL]]212;213  %call = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 %arg0)214  ret ppc_fp128 %call215}216 217define ppc_fp128 @ret_rint_nopinf_ppcf128(ppc_fp128 nofpclass(pinf) %arg0) {218; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_rint_nopinf_ppcf128219; CHECK-SAME: (ppc_fp128 nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] {220; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 nofpclass(pinf) [[ARG0]]) #[[ATTR2]]221; CHECK-NEXT:    ret ppc_fp128 [[CALL]]222;223  %call = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 %arg0)224  ret ppc_fp128 %call225}226 227define ppc_fp128 @ret_rint_noninf_ppcf128(ppc_fp128 nofpclass(ninf) %arg0) {228; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_rint_noninf_ppcf128229; CHECK-SAME: (ppc_fp128 nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] {230; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 nofpclass(ninf) [[ARG0]]) #[[ATTR2]]231; CHECK-NEXT:    ret ppc_fp128 [[CALL]]232;233  %call = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 %arg0)234  ret ppc_fp128 %call235}236 237define ppc_fp128 @ret_rint_nonan_ppcf128(ppc_fp128 nofpclass(nan) %arg0) {238; CHECK-LABEL: define nofpclass(nan sub) ppc_fp128 @ret_rint_nonan_ppcf128239; CHECK-SAME: (ppc_fp128 nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] {240; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(nan sub) ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 nofpclass(nan) [[ARG0]]) #[[ATTR2]]241; CHECK-NEXT:    ret ppc_fp128 [[CALL]]242;243  %call = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 %arg0)244  ret ppc_fp128 %call245}246 247define float @ret_rint_noneg(float nofpclass(ninf nsub nnorm) %arg0) {248; CHECK-LABEL: define nofpclass(ninf sub) float @ret_rint_noneg249; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {250; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.rint.f32(float nofpclass(ninf nsub nnorm) [[ARG0]]) #[[ATTR2]]251; CHECK-NEXT:    ret float [[CALL]]252;253  %call = call float @llvm.rint.f32(float %arg0)254  ret float %call255}256 257define float @ret_rint_noneg_nonegzero(float nofpclass(ninf nsub nnorm nzero) %arg0) {258; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_rint_noneg_nonegzero259; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {260; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.rint.f32(float nofpclass(ninf nzero nsub nnorm) [[ARG0]]) #[[ATTR2]]261; CHECK-NEXT:    ret float [[CALL]]262;263  %call = call float @llvm.rint.f32(float %arg0)264  ret float %call265}266 267define float @ret_rint_noneg_nonegzero_nonan(float nofpclass(ninf nsub nnorm nzero nan) %arg0) {268; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_rint_noneg_nonegzero_nonan269; CHECK-SAME: (float nofpclass(nan ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {270; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.rint.f32(float nofpclass(nan ninf nzero nsub nnorm) [[ARG0]]) #[[ATTR2]]271; CHECK-NEXT:    ret float [[CALL]]272;273  %call = call float @llvm.rint.f32(float %arg0)274  ret float %call275}276 277define float @ret_rint_noneg_nozero(float nofpclass(ninf nsub nnorm zero) %arg0) {278; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_rint_noneg_nozero279; CHECK-SAME: (float nofpclass(ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {280; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.rint.f32(float nofpclass(ninf zero nsub nnorm) [[ARG0]]) #[[ATTR2]]281; CHECK-NEXT:    ret float [[CALL]]282;283  %call = call float @llvm.rint.f32(float %arg0)284  ret float %call285}286 287define float @ret_rint_noneg_nozero_nonan(float nofpclass(ninf nsub nnorm zero nan) %arg0) {288; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_rint_noneg_nozero_nonan289; CHECK-SAME: (float nofpclass(nan ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] {290; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.rint.f32(float nofpclass(nan ninf zero nsub nnorm) [[ARG0]]) #[[ATTR2]]291; CHECK-NEXT:    ret float [[CALL]]292;293  %call = call float @llvm.rint.f32(float %arg0)294  ret float %call295}296 297define float @ret_rint_nopos(float nofpclass(pinf psub pnorm) %arg0) {298; CHECK-LABEL: define nofpclass(pinf sub) float @ret_rint_nopos299; CHECK-SAME: (float nofpclass(pinf psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {300; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.rint.f32(float nofpclass(pinf psub pnorm) [[ARG0]]) #[[ATTR2]]301; CHECK-NEXT:    ret float [[CALL]]302;303  %call = call float @llvm.rint.f32(float %arg0)304  ret float %call305}306 307define float @ret_rint_nopos_nopzero(float nofpclass(pinf psub pnorm pzero) %arg0) {308; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_rint_nopos_nopzero309; CHECK-SAME: (float nofpclass(pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {310; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.rint.f32(float nofpclass(pinf pzero psub pnorm) [[ARG0]]) #[[ATTR2]]311; CHECK-NEXT:    ret float [[CALL]]312;313  %call = call float @llvm.rint.f32(float %arg0)314  ret float %call315}316 317define float @ret_rint_nopos_nopzero_nonan(float nofpclass(pinf psub pnorm pzero nan) %arg0) {318; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_rint_nopos_nopzero_nonan319; CHECK-SAME: (float nofpclass(nan pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {320; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.rint.f32(float nofpclass(nan pinf pzero psub pnorm) [[ARG0]]) #[[ATTR2]]321; CHECK-NEXT:    ret float [[CALL]]322;323  %call = call float @llvm.rint.f32(float %arg0)324  ret float %call325}326 327define float @ret_rint_nopos_nozero(float nofpclass(pinf psub pnorm zero) %arg0) {328; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_rint_nopos_nozero329; CHECK-SAME: (float nofpclass(pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {330; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.rint.f32(float nofpclass(pinf zero psub pnorm) [[ARG0]]) #[[ATTR2]]331; CHECK-NEXT:    ret float [[CALL]]332;333  %call = call float @llvm.rint.f32(float %arg0)334  ret float %call335}336 337define float @ret_rint_nopos_nozero_nonan(float nofpclass(pinf psub pnorm zero nan) %arg0) {338; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_rint_nopos_nozero_nonan339; CHECK-SAME: (float nofpclass(nan pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] {340; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.rint.f32(float nofpclass(nan pinf zero psub pnorm) [[ARG0]]) #[[ATTR2]]341; CHECK-NEXT:    ret float [[CALL]]342;343  %call = call float @llvm.rint.f32(float %arg0)344  ret float %call345}346 347;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:348; TUNIT: {{.*}}349