brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.8 KiB · 5ed7d94 Raw
331 lines · plain
1; RUN: llc < %s -mtriple=arm64 | FileCheck %s2 3; CHECK-LABEL: testmsws:4; CHECK: fcvtms w0, s05; CHECK-NOT: frintx {{s[0-9]+}}, s06define i32 @testmsws(float %a) {7entry:8  %call = call float @floorf(float %a) nounwind readnone9  %conv = fptosi float %call to i3210  ret i32 %conv11}12 13; CHECK-LABEL: testmsxs:14; CHECK: fcvtms x0, s015; CHECK-NOT: frintx {{s[0-9]+}}, s016define i64 @testmsxs(float %a) {17entry:18  %call = call float @floorf(float %a) nounwind readnone19  %conv = fptosi float %call to i6420  ret i64 %conv21}22 23; CHECK-LABEL: testmswd:24; CHECK: fcvtms w0, d025; CHECK-NOT: frintx {{d[0-9]+}}, d026define i32 @testmswd(double %a) {27entry:28  %call = call double @floor(double %a) nounwind readnone29  %conv = fptosi double %call to i3230  ret i32 %conv31}32 33; CHECK-LABEL: testmsxd:34; CHECK: fcvtms x0, d035; CHECK-NOT: frintx {{d[0-9]+}}, d036define i64 @testmsxd(double %a) {37entry:38  %call = call double @floor(double %a) nounwind readnone39  %conv = fptosi double %call to i6440  ret i64 %conv41}42 43; CHECK-LABEL: testmuws:44; CHECK: fcvtmu w0, s045; CHECK-NOT: frintx {{s[0-9]+}}, s046define i32 @testmuws(float %a) {47entry:48  %call = call float @floorf(float %a) nounwind readnone49  %conv = fptoui float %call to i3250  ret i32 %conv51}52 53; CHECK-LABEL: testmuxs:54; CHECK: fcvtmu x0, s055; CHECK-NOT: frintx {{s[0-9]+}}, s056define i64 @testmuxs(float %a) {57entry:58  %call = call float @floorf(float %a) nounwind readnone59  %conv = fptoui float %call to i6460  ret i64 %conv61}62 63; CHECK-LABEL: testmuwd:64; CHECK: fcvtmu w0, d065; CHECK-NOT: frintx {{d[0-9]+}}, d066define i32 @testmuwd(double %a) {67entry:68  %call = call double @floor(double %a) nounwind readnone69  %conv = fptoui double %call to i3270  ret i32 %conv71}72 73; CHECK-LABEL: testmuxd:74; CHECK: fcvtmu x0, d075; CHECK-NOT: frintx {{d[0-9]+}}, d076define i64 @testmuxd(double %a) {77entry:78  %call = call double @floor(double %a) nounwind readnone79  %conv = fptoui double %call to i6480  ret i64 %conv81}82 83; CHECK-LABEL: testpsws:84; CHECK: fcvtps w0, s085; CHECK-NOT: frintx {{s[0-9]+}}, s086define i32 @testpsws(float %a) {87entry:88  %call = call float @ceilf(float %a) nounwind readnone89  %conv = fptosi float %call to i3290  ret i32 %conv91}92 93; CHECK-LABEL: testpsxs:94; CHECK: fcvtps x0, s095; CHECK-NOT: frintx {{s[0-9]+}}, s096define i64 @testpsxs(float %a) {97entry:98  %call = call float @ceilf(float %a) nounwind readnone99  %conv = fptosi float %call to i64100  ret i64 %conv101}102 103; CHECK-LABEL: testpswd:104; CHECK: fcvtps w0, d0105; CHECK-NOT: frintx {{d[0-9]+}}, d0106define i32 @testpswd(double %a) {107entry:108  %call = call double @ceil(double %a) nounwind readnone109  %conv = fptosi double %call to i32110  ret i32 %conv111}112 113; CHECK-LABEL: testpsxd:114; CHECK: fcvtps x0, d0115; CHECK-NOT: frintx {{d[0-9]+}}, d0116define i64 @testpsxd(double %a) {117entry:118  %call = call double @ceil(double %a) nounwind readnone119  %conv = fptosi double %call to i64120  ret i64 %conv121}122 123; CHECK-LABEL: testpuws:124; CHECK: fcvtpu w0, s0125; CHECK-NOT: frintx {{s[0-9]+}}, s0126define i32 @testpuws(float %a) {127entry:128  %call = call float @ceilf(float %a) nounwind readnone129  %conv = fptoui float %call to i32130  ret i32 %conv131}132 133; CHECK-LABEL: testpuxs:134; CHECK: fcvtpu x0, s0135; CHECK-NOT: frintx {{s[0-9]+}}, s0136define i64 @testpuxs(float %a) {137entry:138  %call = call float @ceilf(float %a) nounwind readnone139  %conv = fptoui float %call to i64140  ret i64 %conv141}142 143; CHECK-LABEL: testpuwd:144; CHECK: fcvtpu w0, d0145; CHECK-NOT: frintx {{d[0-9]+}}, d0146define i32 @testpuwd(double %a) {147entry:148  %call = call double @ceil(double %a) nounwind readnone149  %conv = fptoui double %call to i32150  ret i32 %conv151}152 153; CHECK-LABEL: testpuxd:154; CHECK: fcvtpu x0, d0155; CHECK-NOT: frintx {{d[0-9]+}}, d0156define i64 @testpuxd(double %a) {157entry:158  %call = call double @ceil(double %a) nounwind readnone159  %conv = fptoui double %call to i64160  ret i64 %conv161}162 163; CHECK-LABEL: testzsws:164; CHECK: fcvtzs w0, s0165; CHECK-NOT: frintx {{s[0-9]+}}, s0166define i32 @testzsws(float %a) {167entry:168  %call = call float @truncf(float %a) nounwind readnone169  %conv = fptosi float %call to i32170  ret i32 %conv171}172 173; CHECK-LABEL: testzsxs:174; CHECK: fcvtzs x0, s0175; CHECK-NOT: frintx {{s[0-9]+}}, s0176define i64 @testzsxs(float %a) {177entry:178  %call = call float @truncf(float %a) nounwind readnone179  %conv = fptosi float %call to i64180  ret i64 %conv181}182 183; CHECK-LABEL: testzswd:184; CHECK: fcvtzs w0, d0185; CHECK-NOT: frintx {{d[0-9]+}}, d0186define i32 @testzswd(double %a) {187entry:188  %call = call double @trunc(double %a) nounwind readnone189  %conv = fptosi double %call to i32190  ret i32 %conv191}192 193; CHECK-LABEL: testzsxd:194; CHECK: fcvtzs x0, d0195; CHECK-NOT: frintx {{d[0-9]+}}, d0196define i64 @testzsxd(double %a) {197entry:198  %call = call double @trunc(double %a) nounwind readnone199  %conv = fptosi double %call to i64200  ret i64 %conv201}202 203; CHECK-LABEL: testzuws:204; CHECK: fcvtzu w0, s0205; CHECK-NOT: frintx {{s[0-9]+}}, s0206define i32 @testzuws(float %a) {207entry:208  %call = call float @truncf(float %a) nounwind readnone209  %conv = fptoui float %call to i32210  ret i32 %conv211}212 213; CHECK-LABEL: testzuxs:214; CHECK: fcvtzu x0, s0215; CHECK-NOT: frintx {{s[0-9]+}}, s0216define i64 @testzuxs(float %a) {217entry:218  %call = call float @truncf(float %a) nounwind readnone219  %conv = fptoui float %call to i64220  ret i64 %conv221}222 223; CHECK-LABEL: testzuwd:224; CHECK: fcvtzu w0, d0225; CHECK-NOT: frintx {{d[0-9]+}}, d0226define i32 @testzuwd(double %a) {227entry:228  %call = call double @trunc(double %a) nounwind readnone229  %conv = fptoui double %call to i32230  ret i32 %conv231}232 233; CHECK-LABEL: testzuxd:234; CHECK: fcvtzu x0, d0235; CHECK-NOT: frintx {{d[0-9]+}}, d0236define i64 @testzuxd(double %a) {237entry:238  %call = call double @trunc(double %a) nounwind readnone239  %conv = fptoui double %call to i64240  ret i64 %conv241}242 243; CHECK-LABEL: testasws:244; CHECK: fcvtas w0, s0245; CHECK-NOT: frintx {{s[0-9]+}}, s0246define i32 @testasws(float %a) {247entry:248  %call = call float @roundf(float %a) nounwind readnone249  %conv = fptosi float %call to i32250  ret i32 %conv251}252 253; CHECK-LABEL: testasxs:254; CHECK: fcvtas x0, s0255; CHECK-NOT: frintx {{s[0-9]+}}, s0256define i64 @testasxs(float %a) {257entry:258  %call = call float @roundf(float %a) nounwind readnone259  %conv = fptosi float %call to i64260  ret i64 %conv261}262 263; CHECK-LABEL: testaswd:264; CHECK: fcvtas w0, d0265; CHECK-NOT: frintx {{d[0-9]+}}, d0266define i32 @testaswd(double %a) {267entry:268  %call = call double @round(double %a) nounwind readnone269  %conv = fptosi double %call to i32270  ret i32 %conv271}272 273; CHECK-LABEL: testasxd:274; CHECK: fcvtas x0, d0275; CHECK-NOT: frintx {{d[0-9]+}}, d0276define i64 @testasxd(double %a) {277entry:278  %call = call double @round(double %a) nounwind readnone279  %conv = fptosi double %call to i64280  ret i64 %conv281}282 283; CHECK-LABEL: testauws:284; CHECK: fcvtau w0, s0285; CHECK-NOT: frintx {{s[0-9]+}}, s0286define i32 @testauws(float %a) {287entry:288  %call = call float @roundf(float %a) nounwind readnone289  %conv = fptoui float %call to i32290  ret i32 %conv291}292 293; CHECK-LABEL: testauxs:294; CHECK: fcvtau x0, s0295; CHECK-NOT: frintx {{s[0-9]+}}, s0296define i64 @testauxs(float %a) {297entry:298  %call = call float @roundf(float %a) nounwind readnone299  %conv = fptoui float %call to i64300  ret i64 %conv301}302 303; CHECK-LABEL: testauwd:304; CHECK: fcvtau w0, d0305; CHECK-NOT: frintx {{d[0-9]+}}, d0306define i32 @testauwd(double %a) {307entry:308  %call = call double @round(double %a) nounwind readnone309  %conv = fptoui double %call to i32310  ret i32 %conv311}312 313; CHECK-LABEL: testauxd:314; CHECK: fcvtau x0, d0315; CHECK-NOT: frintx {{d[0-9]+}}, d0316define i64 @testauxd(double %a) {317entry:318  %call = call double @round(double %a) nounwind readnone319  %conv = fptoui double %call to i64320  ret i64 %conv321}322 323declare float @floorf(float) nounwind readnone324declare double @floor(double) nounwind readnone325declare float @ceilf(float) nounwind readnone326declare double @ceil(double) nounwind readnone327declare float @truncf(float) nounwind readnone328declare double @trunc(double) nounwind readnone329declare float @roundf(float) nounwind readnone330declare double @round(double) nounwind readnone331