[llvm] r346541 - [SystemZ] Add a couple of missing tests

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 9 11:16:21 PST 2018


Author: uweigand
Date: Fri Nov  9 11:16:21 2018
New Revision: 346541

URL: http://llvm.org/viewvc/llvm-project?rev=346541&view=rev
Log:
[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.


Modified:
    llvm/trunk/test/CodeGen/SystemZ/fp-round-01.ll

Modified: llvm/trunk/test/CodeGen/SystemZ/fp-round-01.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SystemZ/fp-round-01.ll?rev=346541&r1=346540&r2=346541&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/SystemZ/fp-round-01.ll (original)
+++ llvm/trunk/test/CodeGen/SystemZ/fp-round-01.ll Fri Nov  9 11:16:21 2018
@@ -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 at 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 at 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 at 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 at 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 at PLT
+; CHECK: br %r14
+  %src = load fp128, fp128 *%ptr
+  %res = call fp128 @llvm.round.f128(fp128 %src)
+  store fp128 %res, fp128 *%ptr
+  ret void
+}




More information about the llvm-commits mailing list