@@ -479,63 +479,43 @@ entry:
479479define i32 @testnsws (float %a ) {
480480; CHECK-LABEL: testnsws:
481481; CHECK: // %bb.0: // %entry
482- ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
483- ; CHECK-NEXT: .cfi_def_cfa_offset 16
484- ; CHECK-NEXT: .cfi_offset w30, -16
485- ; CHECK-NEXT: bl roundevenf
486- ; CHECK-NEXT: fcvtzs w0, s0
487- ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
482+ ; CHECK-NEXT: fcvtns w0, s0
488483; CHECK-NEXT: ret
489484entry:
490- %r = call float @roundevenf (float %a ) nounwind readnone
485+ %r = call float @llvm.roundeven.f32 (float %a ) nounwind readnone
491486 %i = call i32 @llvm.fptosi.sat.i32.f32 (float %r )
492487 ret i32 %i
493488}
494489
495490define i64 @testnsxs (float %a ) {
496491; CHECK-LABEL: testnsxs:
497492; CHECK: // %bb.0: // %entry
498- ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
499- ; CHECK-NEXT: .cfi_def_cfa_offset 16
500- ; CHECK-NEXT: .cfi_offset w30, -16
501- ; CHECK-NEXT: bl roundevenf
502- ; CHECK-NEXT: fcvtzs x0, s0
503- ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
493+ ; CHECK-NEXT: fcvtns x0, s0
504494; CHECK-NEXT: ret
505495entry:
506- %r = call float @roundevenf (float %a ) nounwind readnone
496+ %r = call float @llvm.roundeven.f32 (float %a ) nounwind readnone
507497 %i = call i64 @llvm.fptosi.sat.i64.f32 (float %r )
508498 ret i64 %i
509499}
510500
511501define i32 @testnswd (double %a ) {
512502; CHECK-LABEL: testnswd:
513503; CHECK: // %bb.0: // %entry
514- ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
515- ; CHECK-NEXT: .cfi_def_cfa_offset 16
516- ; CHECK-NEXT: .cfi_offset w30, -16
517- ; CHECK-NEXT: bl roundeven
518- ; CHECK-NEXT: fcvtzs w0, d0
519- ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
504+ ; CHECK-NEXT: fcvtns w0, d0
520505; CHECK-NEXT: ret
521506entry:
522- %r = call double @roundeven (double %a ) nounwind readnone
507+ %r = call double @llvm. roundeven.f64 (double %a ) nounwind readnone
523508 %i = call i32 @llvm.fptosi.sat.i32.f64 (double %r )
524509 ret i32 %i
525510}
526511
527512define i64 @testnsxd (double %a ) {
528513; CHECK-LABEL: testnsxd:
529514; CHECK: // %bb.0: // %entry
530- ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
531- ; CHECK-NEXT: .cfi_def_cfa_offset 16
532- ; CHECK-NEXT: .cfi_offset w30, -16
533- ; CHECK-NEXT: bl roundeven
534- ; CHECK-NEXT: fcvtzs x0, d0
535- ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
515+ ; CHECK-NEXT: fcvtns x0, d0
536516; CHECK-NEXT: ret
537517entry:
538- %r = call double @roundeven (double %a ) nounwind readnone
518+ %r = call double @llvm. roundeven.f64 (double %a ) nounwind readnone
539519 %i = call i64 @llvm.fptosi.sat.i64.f64 (double %r )
540520 ret i64 %i
541521}
@@ -562,9 +542,7 @@ declare float @floorf(float) nounwind readnone
562542declare float @ceilf (float ) nounwind readnone
563543declare float @truncf (float ) nounwind readnone
564544declare float @roundf (float ) nounwind readnone
565- declare float @roundevenf (float ) nounwind readnone
566545declare double @floor (double ) nounwind readnone
567546declare double @ceil (double ) nounwind readnone
568547declare double @trunc (double ) nounwind readnone
569548declare double @round (double ) nounwind readnone
570- declare double @roundeven (double ) nounwind readnone
0 commit comments