[llvm] r371360 - [X86] Add fp128 test cases for ceil/floor/trunc/nearbyint/rint/round libcalls.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 8 19:44:46 PDT 2019
Author: ctopper
Date: Sun Sep 8 19:44:46 2019
New Revision: 371360
URL: http://llvm.org/viewvc/llvm-project?rev=371360&view=rev
Log:
[X86] Add fp128 test cases for ceil/floor/trunc/nearbyint/rint/round libcalls.
Modified:
llvm/trunk/test/CodeGen/X86/fp128-libcalls.ll
Modified: llvm/trunk/test/CodeGen/X86/fp128-libcalls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fp128-libcalls.ll?rev=371360&r1=371359&r2=371360&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fp128-libcalls.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fp128-libcalls.ll Sun Sep 8 19:44:46 2019
@@ -235,3 +235,92 @@ entry:
}
declare fp128 @llvm.cos.f128(fp128)
+define void @Test128Ceil(fp128 %d1) nounwind {
+; CHECK-LABEL: Test128Ceil:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rax
+; CHECK-NEXT: callq ceill
+; CHECK-NEXT: movaps %xmm0, {{.*}}(%rip)
+; CHECK-NEXT: popq %rax
+; CHECK-NEXT: retq
+entry:
+ %sqrt = call fp128 @llvm.ceil.f128(fp128 %d1)
+ store fp128 %sqrt, fp128* @vf128, align 16
+ ret void
+}
+declare fp128 @llvm.ceil.f128(fp128)
+
+define void @Test128Floor(fp128 %d1) nounwind {
+; CHECK-LABEL: Test128Floor:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rax
+; CHECK-NEXT: callq floorl
+; CHECK-NEXT: movaps %xmm0, {{.*}}(%rip)
+; CHECK-NEXT: popq %rax
+; CHECK-NEXT: retq
+entry:
+ %sqrt = call fp128 @llvm.floor.f128(fp128 %d1)
+ store fp128 %sqrt, fp128* @vf128, align 16
+ ret void
+}
+declare fp128 @llvm.floor.f128(fp128)
+
+define void @Test128Trunc(fp128 %d1) nounwind {
+; CHECK-LABEL: Test128Trunc:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rax
+; CHECK-NEXT: callq truncl
+; CHECK-NEXT: movaps %xmm0, {{.*}}(%rip)
+; CHECK-NEXT: popq %rax
+; CHECK-NEXT: retq
+entry:
+ %sqrt = call fp128 @llvm.trunc.f128(fp128 %d1)
+ store fp128 %sqrt, fp128* @vf128, align 16
+ ret void
+}
+declare fp128 @llvm.trunc.f128(fp128)
+
+define void @Test128Nearbyint(fp128 %d1) nounwind {
+; CHECK-LABEL: Test128Nearbyint:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rax
+; CHECK-NEXT: callq nearbyintl
+; CHECK-NEXT: movaps %xmm0, {{.*}}(%rip)
+; CHECK-NEXT: popq %rax
+; CHECK-NEXT: retq
+entry:
+ %sqrt = call fp128 @llvm.nearbyint.f128(fp128 %d1)
+ store fp128 %sqrt, fp128* @vf128, align 16
+ ret void
+}
+declare fp128 @llvm.nearbyint.f128(fp128)
+
+define void @Test128Rint(fp128 %d1) nounwind {
+; CHECK-LABEL: Test128Rint:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rax
+; CHECK-NEXT: callq rintl
+; CHECK-NEXT: movaps %xmm0, {{.*}}(%rip)
+; CHECK-NEXT: popq %rax
+; CHECK-NEXT: retq
+entry:
+ %sqrt = call fp128 @llvm.rint.f128(fp128 %d1)
+ store fp128 %sqrt, fp128* @vf128, align 16
+ ret void
+}
+declare fp128 @llvm.rint.f128(fp128)
+
+define void @Test128Round(fp128 %d1) nounwind {
+; CHECK-LABEL: Test128Round:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: pushq %rax
+; CHECK-NEXT: callq roundl
+; CHECK-NEXT: movaps %xmm0, {{.*}}(%rip)
+; CHECK-NEXT: popq %rax
+; CHECK-NEXT: retq
+entry:
+ %sqrt = call fp128 @llvm.round.f128(fp128 %d1)
+ store fp128 %sqrt, fp128* @vf128, align 16
+ ret void
+}
+declare fp128 @llvm.round.f128(fp128)
More information about the llvm-commits
mailing list