Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/llvm-intrinsics/nearbyint.ll

raw
1 ; RUN: llvm-as %s -o %t.bc
2 ; RUN: llvm-spirv %t.bc -spirv-text -o - | FileCheck %s
3 ; RUN: llvm-spirv %t.bc -o %t.spv
4 ; RUN: spirv-val %t.spv
5
6 target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
7 target triple = "spir"
8
9 ; CHECK: ExtInst {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} rint
10
11 ; Function Attrs: nounwind readnone
12 define dso_local spir_func float @foo(float %x) local_unnamed_addr #0 {
13 entry:
14 %0 = tail call float @llvm.nearbyint.f32(float %x)
15 ret float %0
16 }
17
18 ; Function Attrs: nounwind readnone speculatable willreturn
19 declare float @llvm.nearbyint.f32(float) #1
20
21 attributes #0 = { nounwind readnone "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
22 attributes #1 = { nounwind readnone speculatable willreturn }
23
24 !llvm.module.flags = !{!0}
25 !llvm.ident = !{!1}
26
27 !0 = !{i32 1, !"wchar_size", i32 4}
28 !1 = !{!"clang version 12.0.0 (https://github.com/llvm/llvm-project.git 68e1a8d20795802077987529e1268c184d749564)"}