• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=wasm32 | FileCheck %s
3
4define i64 @testmsxs_builtin(float %x) {
5; CHECK-LABEL: testmsxs_builtin:
6; CHECK:         .functype testmsxs_builtin (f32) -> (i64)
7; CHECK-NEXT:  # %bb.0: # %entry
8; CHECK-NEXT:    local.get 0
9; CHECK-NEXT:    call llroundf
10; CHECK-NEXT:    # fallthrough-return
11; CHECK-NEXT:    end_function
12entry:
13  %0 = tail call i64 @llvm.llround.f32(float %x)
14  ret i64 %0
15}
16
17define i64 @testmsxd_builtin(double %x) {
18; CHECK-LABEL: testmsxd_builtin:
19; CHECK:         .functype testmsxd_builtin (f64) -> (i64)
20; CHECK-NEXT:  # %bb.0: # %entry
21; CHECK-NEXT:    local.get 0
22; CHECK-NEXT:    call llround
23; CHECK-NEXT:    # fallthrough-return
24; CHECK-NEXT:    end_function
25entry:
26  %0 = tail call i64 @llvm.llround.f64(double %x)
27  ret i64 %0
28}
29
30declare i64 @llvm.llround.f32(float) nounwind readnone
31declare i64 @llvm.llround.f64(double) nounwind readnone
32