summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2018-11-09 19:16:21 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2018-11-09 19:16:21 +0000
commite32d1297124fc1d7b3aeec8530f77e1babe8fb93 (patch)
tree2bbdd7f4a7ae45823c7ab3056ad475d5dc91cf01
parentddbde9a4add367c12b4ff8bda5e7a6b351b645c6 (diff)
downloadbcm5719-llvm-e32d1297124fc1d7b3aeec8530f77e1babe8fb93.tar.gz
bcm5719-llvm-e32d1297124fc1d7b3aeec8530f77e1babe8fb93.zip
[SystemZ] Add a couple of missing tests
A few fp128 tests were omitted from test/CodeGen/SystemZ/fp-round-01.ll since in early days, LLVM couldn't handle implicitly generated library calls to functions with long double arguments on SystemZ. This deficiency was actually long since fixed, but those tests are still missing. This patch adds the missing tests. NFC. llvm-svn: 346541
-rw-r--r--llvm/test/CodeGen/SystemZ/fp-round-01.ll65
1 files changed, 55 insertions, 10 deletions
diff --git a/llvm/test/CodeGen/SystemZ/fp-round-01.ll b/llvm/test/CodeGen/SystemZ/fp-round-01.ll
index b68a15bccdd..186fb3c2d0d 100644
--- a/llvm/test/CodeGen/SystemZ/fp-round-01.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-round-01.ll
@@ -54,8 +54,17 @@ define double @f5(double %f) {
ret double %res
}
-; Test nearbyint for f128: omitted for now because we cannot handle
-; indirect arguments.
+; Test nearbyint for f128.
+declare fp128 @llvm.nearbyint.f128(fp128 %f)
+define void @f6(fp128 *%ptr) {
+; CHECK-LABEL: f6:
+; CHECK: brasl %r14, nearbyintl@PLT
+; CHECK: br %r14
+ %src = load fp128, fp128 *%ptr
+ %res = call fp128 @llvm.nearbyint.f128(fp128 %src)
+ store fp128 %res, fp128 *%ptr
+ ret void
+}
; Test floor for f32.
declare float @llvm.floor.f32(float %f)
@@ -77,8 +86,17 @@ define double @f8(double %f) {
ret double %res
}
-; Test floor for f128: omitted for now because we cannot handle
-; indirect arguments.
+; Test floor for f128.
+declare fp128 @llvm.floor.f128(fp128 %f)
+define void @f9(fp128 *%ptr) {
+; CHECK-LABEL: f9:
+; CHECK: brasl %r14, floorl@PLT
+; CHECK: br %r14
+ %src = load fp128, fp128 *%ptr
+ %res = call fp128 @llvm.floor.f128(fp128 %src)
+ store fp128 %res, fp128 *%ptr
+ ret void
+}
; Test ceil for f32.
declare float @llvm.ceil.f32(float %f)
@@ -100,8 +118,17 @@ define double @f11(double %f) {
ret double %res
}
-; Test ceil for f128: omitted for now because we cannot handle
-; indirect arguments.
+; Test ceil for f128.
+declare fp128 @llvm.ceil.f128(fp128 %f)
+define void @f12(fp128 *%ptr) {
+; CHECK-LABEL: f12:
+; CHECK: brasl %r14, ceill@PLT
+; CHECK: br %r14
+ %src = load fp128, fp128 *%ptr
+ %res = call fp128 @llvm.ceil.f128(fp128 %src)
+ store fp128 %res, fp128 *%ptr
+ ret void
+}
; Test trunc for f32.
declare float @llvm.trunc.f32(float %f)
@@ -123,8 +150,17 @@ define double @f14(double %f) {
ret double %res
}
-; Test trunc for f128: omitted for now because we cannot handle
-; indirect arguments.
+; Test trunc for f128.
+declare fp128 @llvm.trunc.f128(fp128 %f)
+define void @f15(fp128 *%ptr) {
+; CHECK-LABEL: f15:
+; CHECK: brasl %r14, truncl@PLT
+; CHECK: br %r14
+ %src = load fp128, fp128 *%ptr
+ %res = call fp128 @llvm.trunc.f128(fp128 %src)
+ store fp128 %res, fp128 *%ptr
+ ret void
+}
; Test round for f32.
declare float @llvm.round.f32(float %f)
@@ -146,5 +182,14 @@ define double @f17(double %f) {
ret double %res
}
-; Test round for f128: omitted for now because we cannot handle
-; indirect arguments.
+; Test round for f128.
+declare fp128 @llvm.round.f128(fp128 %f)
+define void @f18(fp128 *%ptr) {
+; CHECK-LABEL: f18:
+; CHECK: brasl %r14, roundl@PLT
+; CHECK: br %r14
+ %src = load fp128, fp128 *%ptr
+ %res = call fp128 @llvm.round.f128(fp128 %src)
+ store fp128 %res, fp128 *%ptr
+ ret void
+}
OpenPOWER on IntegriCloud