1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -global-isel -mtriple=x86_64-linux-gnu < %s | FileCheck %s
4 ; FIXME: Calling convention lowering fails
5 ; define half @roundeven_f16(half %x) {
6 ; %roundeven = call half @llvm.roundeven.f16(half %x)
10 define float @roundeven_f32(float %x) {
11 ; CHECK-LABEL: roundeven_f32:
13 ; CHECK-NEXT: pushq %rax
14 ; CHECK-NEXT: .cfi_def_cfa_offset 16
15 ; CHECK-NEXT: callq roundevenf
16 ; CHECK-NEXT: popq %rax
17 ; CHECK-NEXT: .cfi_def_cfa_offset 8
19 %roundeven = call float @llvm.roundeven.f32(float %x)
23 define double @roundeven_f64(double %x) {
24 ; CHECK-LABEL: roundeven_f64:
26 ; CHECK-NEXT: pushq %rax
27 ; CHECK-NEXT: .cfi_def_cfa_offset 16
28 ; CHECK-NEXT: callq roundeven
29 ; CHECK-NEXT: popq %rax
30 ; CHECK-NEXT: .cfi_def_cfa_offset 8
32 %roundeven = call double @llvm.roundeven.f64(double %x)
37 ; define x86_fp80 @roundeven_fp80(x86_fp80 %x) {
38 ; %roundeven = call x86_fp80 @llvm.roundeven.f80(x86_fp80 %x)
39 ; ret x86_fp80 %roundeven
42 define fp128 @roundeven_f128(fp128 %x) {
43 ; CHECK-LABEL: roundeven_f128:
45 ; CHECK-NEXT: pushq %rax
46 ; CHECK-NEXT: .cfi_def_cfa_offset 16
47 ; CHECK-NEXT: callq roundevenl
48 ; CHECK-NEXT: popq %rax
49 ; CHECK-NEXT: .cfi_def_cfa_offset 8
51 %roundeven = call fp128 @llvm.roundeven.f128(fp128 %x)
55 ; FIXME: Fails on build_vector
56 ; define <4 x float> @roundeven_v4f32(<4 x float> %x) {
57 ; %roundeven = call <4 x float> @llvm.roundeven.v4f32(<4 x float> %x)
58 ; ret <4 x float> %roundeven
61 declare half @llvm.roundeven.f16(half) #0
62 declare float @llvm.roundeven.f32(float) #0
63 declare <4 x float> @llvm.roundeven.v4f32(<4 x float>) #0
64 declare double @llvm.roundeven.f64(double) #0
65 declare x86_fp80 @llvm.roundeven.f80(x86_fp80) #0
66 declare fp128 @llvm.roundeven.f128(fp128) #0
68 attributes #0 = { nounwind readnone speculatable willreturn }