-; RUN: llc -O3 < %s -mcpu=cyclone | FileCheck %s
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n32:64"
-target triple = "arm64-apple-ios6.0.0"
+; RUN: llc -O3 < %s -mtriple=arm64-apple-ios7.0 | FileCheck %s --check-prefix=CHECK-INEXACT
+; RUN: llc -O3 < %s -mtriple=aarch64-linux-gnu | FileCheck %s --check-prefix=CHECK-FAST
-; CHECK: test1
-; CHECK: frintx
-; CHECK: frintm
+; CHECK-INEXACT-LABEL: test1:
+; CHECK-INEXACT-DAG: frintm
+; CHECK-INEXACT-DAG: frintx
+
+; CHECK-FAST-LABEL: test1:
+; CHECK-FAST: frintm
+; CHECK-FAST-NOT: frintx
define float @test1(float %a) #0 {
entry:
%call = tail call float @floorf(float %a) nounwind readnone
declare float @floorf(float) nounwind readnone
-; CHECK: test2
-; CHECK: frintx
-; CHECK: frintm
+; CHECK-INEXACT-LABEL: test2:
+; CHECK-INEXACT: frintm
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test2:
+; CHECK-FAST: frintm
+; CHECK-FAST-NOT: frintx
define double @test2(double %a) #0 {
entry:
%call = tail call double @floor(double %a) nounwind readnone
declare double @floor(double) nounwind readnone
-; CHECK: test3
-; CHECK: frinti
+; CHECK-INEXACT-LABEL: test3:
+; CHECK-INEXACT: frinti
+
+; CHECK-FAST-LABEL: test3:
+; CHECK-FAST: frinti
define float @test3(float %a) #0 {
entry:
%call = tail call float @nearbyintf(float %a) nounwind readnone
declare float @nearbyintf(float) nounwind readnone
-; CHECK: test4
-; CHECK: frinti
+; CHECK-INEXACT-LABEL: test4:
+; CHECK-INEXACT: frinti
+
+; CHECK-FAST-LABEL: test4:
+; CHECK-FAST: frinti
define double @test4(double %a) #0 {
entry:
%call = tail call double @nearbyint(double %a) nounwind readnone
declare double @nearbyint(double) nounwind readnone
-; CHECK: test5
-; CHECK: frintx
-; CHECK: frintp
+; CHECK-INEXACT-LABEL: test5:
+; CHECK-INEXACT: frintp
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test5:
+; CHECK-FAST: frintp
+; CHECK-FAST-NOT: frintx
define float @test5(float %a) #0 {
entry:
%call = tail call float @ceilf(float %a) nounwind readnone
declare float @ceilf(float) nounwind readnone
-; CHECK: test6
-; CHECK: frintx
-; CHECK: frintp
+; CHECK-INEXACT-LABEL: test6:
+; CHECK-INEXACT: frintp
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test6:
+; CHECK-FAST: frintp
+; CHECK-FAST-NOT: frintx
define double @test6(double %a) #0 {
entry:
%call = tail call double @ceil(double %a) nounwind readnone
declare double @ceil(double) nounwind readnone
-; CHECK: test7
-; CHECK: frintx
+; CHECK-INEXACT-LABEL: test7:
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test7:
+; CHECK-FAST: frintx
define float @test7(float %a) #0 {
entry:
%call = tail call float @rintf(float %a) nounwind readnone
declare float @rintf(float) nounwind readnone
-; CHECK: test8
-; CHECK: frintx
+; CHECK-INEXACT-LABEL: test8:
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test8:
+; CHECK-FAST: frintx
define double @test8(double %a) #0 {
entry:
%call = tail call double @rint(double %a) nounwind readnone
declare double @rint(double) nounwind readnone
-; CHECK: test9
-; CHECK: frintx
-; CHECK: frintz
+; CHECK-INEXACT-LABEL: test9:
+; CHECK-INEXACT: frintz
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test9:
+; CHECK-FAST: frintz
+; CHECK-FAST-NOT: frintx
define float @test9(float %a) #0 {
entry:
%call = tail call float @truncf(float %a) nounwind readnone
declare float @truncf(float) nounwind readnone
-; CHECK: test10
-; CHECK: frintx
-; CHECK: frintz
+; CHECK-INEXACT-LABEL: test10:
+; CHECK-INEXACT: frintz
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test10:
+; CHECK-FAST: frintz
+; CHECK-FAST-NOT: frintx
define double @test10(double %a) #0 {
entry:
%call = tail call double @trunc(double %a) nounwind readnone
declare double @trunc(double) nounwind readnone
-; CHECK: test11
-; CHECK: frintx
-; CHECK: frinta
+; CHECK-INEXACT-LABEL: test11:
+; CHECK-INEXACT: frinta
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test11:
+; CHECK-FAST: frinta
+; CHECK-FAST-NOT: frintx
define float @test11(float %a) #0 {
entry:
%call = tail call float @roundf(float %a) nounwind readnone
declare float @roundf(float %a) nounwind readnone
-; CHECK: test12
-; CHECK: frintx
-; CHECK: frinta
+; CHECK-INEXACT-LABEL: test12:
+; CHECK-INEXACT: frinta
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test12:
+; CHECK-FAST: frinta
+; CHECK-FAST-NOT: frintx
define double @test12(double %a) #0 {
entry:
%call = tail call double @round(double %a) nounwind readnone
declare double @round(double %a) nounwind readnone
-; CHECK: test13
-; CHECK-NOT: frintx
-; CHECK: frintm
+; CHECK-INEXACT-LABEL: test13:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frintm
+
+; CHECK-FAST-LABEL: test13:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frintm
define float @test13(float %a) #1 {
entry:
%call = tail call float @floorf(float %a) nounwind readnone
ret float %call
}
-; CHECK: test14
-; CHECK-NOT: frintx
-; CHECK: frintm
+; CHECK-INEXACT-LABEL: test14:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frintm
+
+; CHECK-FAST-LABEL: test14:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frintm
define double @test14(double %a) #1 {
entry:
%call = tail call double @floor(double %a) nounwind readnone
ret double %call
}
-; CHECK: test15
-; CHECK-NOT: frintx
-; CHECK: frintp
+; CHECK-INEXACT-LABEL: test15:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frintp
+
+; CHECK-FAST-LABEL: test15:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frintp
define float @test15(float %a) #1 {
entry:
%call = tail call float @ceilf(float %a) nounwind readnone
ret float %call
}
-; CHECK: test16
-; CHECK-NOT: frintx
-; CHECK: frintp
+; CHECK-INEXACT-LABEL: test16:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frintp
+
+; CHECK-FAST-LABEL: test16:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frintp
define double @test16(double %a) #1 {
entry:
%call = tail call double @ceil(double %a) nounwind readnone
ret double %call
}
-; CHECK: test17
-; CHECK-NOT: frintx
-; CHECK: frintz
+; CHECK-INEXACT-LABEL: test17:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frintz
+
+; CHECK-FAST-LABEL: test17:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frintz
define float @test17(float %a) #1 {
entry:
%call = tail call float @truncf(float %a) nounwind readnone
ret float %call
}
-; CHECK: test18
-; CHECK-NOT: frintx
-; CHECK: frintz
+; CHECK-INEXACT-LABEL: test18:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frintz
+
+; CHECK-FAST-LABEL: test18:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frintz
define double @test18(double %a) #1 {
entry:
%call = tail call double @trunc(double %a) nounwind readnone
ret double %call
}
-; CHECK: test19
-; CHECK-NOT: frintx
-; CHECK: frinta
+; CHECK-INEXACT-LABEL: test19:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frinta
+
+; CHECK-FAST-LABEL: test19:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frinta
define float @test19(float %a) #1 {
entry:
%call = tail call float @roundf(float %a) nounwind readnone
ret float %call
}
-; CHECK: test20
-; CHECK-NOT: frintx
-; CHECK: frinta
+; CHECK-INEXACT-LABEL: test20:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frinta
+
+; CHECK-FAST-LABEL: test20:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frinta
define double @test20(double %a) #1 {
entry:
%call = tail call double @round(double %a) nounwind readnone
}
; CHECK-LABEL: test_floor:
-; CHECK-NEXT: fcvt s1, h0
-; CHECK-NEXT: frintm s0, s1
-; CHECK-NEXT: fcvt h0, s0
-; CHECK-NEXT: frintx s1, s1
+; CHECK-NEXT: fcvt [[FLOAT32:s[0-9]+]], h0
+; CHECK-NEXT: frintm [[INT32:s[0-9]+]], [[FLOAT32]]
+; CHECK-NEXT: fcvt h0, [[INT32]]
; CHECK-NEXT: ret
define half @test_floor(half %a) #0 {
%r = call half @llvm.floor.f16(half %a)
}
; CHECK-LABEL: test_ceil:
-; CHECK-NEXT: fcvt s1, h0
-; CHECK-NEXT: frintp s0, s1
-; CHECK-NEXT: fcvt h0, s0
-; CHECK-NEXT: frintx s1, s1
+; CHECK-NEXT: fcvt [[FLOAT32:s[0-9]+]], h0
+; CHECK-NEXT: frintp [[INT32:s[0-9]+]], [[FLOAT32]]
+; CHECK-NEXT: fcvt h0, [[INT32]]
; CHECK-NEXT: ret
define half @test_ceil(half %a) #0 {
%r = call half @llvm.ceil.f16(half %a)
}
; CHECK-LABEL: test_trunc:
-; CHECK-NEXT: fcvt s1, h0
-; CHECK-NEXT: frintz s0, s1
-; CHECK-NEXT: fcvt h0, s0
-; CHECK-NEXT: frintx s1, s1
+; CHECK-NEXT: fcvt [[FLOAT32:s[0-9]+]], h0
+; CHECK-NEXT: frintz [[INT32:s[0-9]+]], [[FLOAT32]]
+; CHECK-NEXT: fcvt h0, [[INT32]]
; CHECK-NEXT: ret
define half @test_trunc(half %a) #0 {
%r = call half @llvm.trunc.f16(half %a)
}
; CHECK-LABEL: test_round:
-; CHECK-NEXT: fcvt s1, h0
-; CHECK-NEXT: frinta s0, s1
-; CHECK-NEXT: fcvt h0, s0
-; CHECK-NEXT: frintx s1, s1
+; CHECK-NEXT: fcvt [[FLOAT32:s[0-9]+]], h0
+; CHECK-NEXT: frinta [[INT32:s[0-9]+]], [[FLOAT32]]
+; CHECK-NEXT: fcvt h0, [[INT32]]
; CHECK-NEXT: ret
define half @test_round(half %a) #0 {
%r = call half @llvm.round.f16(half %a)