1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512fp16 -O3 | FileCheck %s --check-prefixes=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512fp16 -O3 | FileCheck %s --check-prefixes=X64
5 declare half @llvm.experimental.constrained.ceil.f16(half, metadata)
6 declare half @llvm.experimental.constrained.floor.f16(half, metadata)
7 declare half @llvm.experimental.constrained.trunc.f16(half, metadata)
8 declare half @llvm.experimental.constrained.rint.f16(half, metadata, metadata)
9 declare half @llvm.experimental.constrained.nearbyint.f16(half, metadata, metadata)
11 define half @fceil32(half %f) #0 {
14 ; X86-NEXT: vrndscalesh $10, {{[0-9]+}}(%esp), %xmm0, %xmm0
19 ; X64-NEXT: vrndscalesh $10, %xmm0, %xmm0, %xmm0
21 %res = call half @llvm.experimental.constrained.ceil.f16(
22 half %f, metadata !"fpexcept.strict") #0
26 define half @ffloor32(half %f) #0 {
27 ; X86-LABEL: ffloor32:
29 ; X86-NEXT: vrndscalesh $9, {{[0-9]+}}(%esp), %xmm0, %xmm0
32 ; X64-LABEL: ffloor32:
34 ; X64-NEXT: vrndscalesh $9, %xmm0, %xmm0, %xmm0
36 %res = call half @llvm.experimental.constrained.floor.f16(
37 half %f, metadata !"fpexcept.strict") #0
41 define half @ftrunc32(half %f) #0 {
42 ; X86-LABEL: ftrunc32:
44 ; X86-NEXT: vrndscalesh $11, {{[0-9]+}}(%esp), %xmm0, %xmm0
47 ; X64-LABEL: ftrunc32:
49 ; X64-NEXT: vrndscalesh $11, %xmm0, %xmm0, %xmm0
51 %res = call half @llvm.experimental.constrained.trunc.f16(
52 half %f, metadata !"fpexcept.strict") #0
56 define half @frint32(half %f) #0 {
59 ; X86-NEXT: vrndscalesh $4, {{[0-9]+}}(%esp), %xmm0, %xmm0
64 ; X64-NEXT: vrndscalesh $4, %xmm0, %xmm0, %xmm0
66 %res = call half @llvm.experimental.constrained.rint.f16(
68 metadata !"round.dynamic", metadata !"fpexcept.strict") #0
72 define half @fnearbyint32(half %f) #0 {
73 ; X86-LABEL: fnearbyint32:
75 ; X86-NEXT: vrndscalesh $12, {{[0-9]+}}(%esp), %xmm0, %xmm0
78 ; X64-LABEL: fnearbyint32:
80 ; X64-NEXT: vrndscalesh $12, %xmm0, %xmm0, %xmm0
82 %res = call half @llvm.experimental.constrained.nearbyint.f16(
84 metadata !"round.dynamic", metadata !"fpexcept.strict") #0
88 attributes #0 = { strictfp }