[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
This commit is contained in:
Ulrich Weigand 2018-11-09 19:16:21 +00:00
parent ddbde9a4ad
commit e32d129712
1 changed files with 55 additions and 10 deletions

View File

@ -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
}