summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVenkatraman Govindaraju <venkatra@cs.wisc.edu>2013-11-03 08:00:19 +0000
committerVenkatraman Govindaraju <venkatra@cs.wisc.edu>2013-11-03 08:00:19 +0000
commit5e45051e0ee8917a88e84d799c5c90840d0c465b (patch)
treed9874a2adb34eb9d396c0b4add084c344cc46479 /test
parent30288ac4020138a09ae2a0e4c989b1003340150b (diff)
downloadllvm-5e45051e0ee8917a88e84d799c5c90840d0c465b.tar.gz
llvm-5e45051e0ee8917a88e84d799c5c90840d0c465b.tar.bz2
llvm-5e45051e0ee8917a88e84d799c5c90840d0c465b.tar.xz
[Sparc] Expand FP_TO_UINT, UINT_TO_FP for fp128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/SPARC/fp128.ll32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/fp128.ll b/test/CodeGen/SPARC/fp128.ll
index 7820b76638..8049dbe98c 100644
--- a/test/CodeGen/SPARC/fp128.ll
+++ b/test/CodeGen/SPARC/fp128.ll
@@ -148,3 +148,35 @@ entry:
store fp128 %2, fp128* %c, align 1
ret void
}
+
+; HARD-LABEL: uint_to_f128
+; HARD: fdtoq
+
+; SOFT-LABEL: uint_to_f128
+; SOFT: _Q_utoq
+
+define void @uint_to_f128(fp128* noalias sret %scalar.result, i32 %i) {
+entry:
+ %0 = uitofp i32 %i to fp128
+ store fp128 %0, fp128* %scalar.result, align 8
+ ret void
+}
+
+; HARD-LABEL: f128_to_i32
+; HARD: fqtoi
+; HARD: fqtoi
+
+; SOFT-LABEL: f128_to_i32
+; SOFT: call _Q_qtou
+; SOFT: call _Q_qtoi
+
+
+define i32 @f128_to_i32(fp128* %a, fp128* %b) {
+entry:
+ %0 = load fp128* %a, align 8
+ %1 = load fp128* %b, align 8
+ %2 = fptoui fp128 %0 to i32
+ %3 = fptosi fp128 %1 to i32
+ %4 = add i32 %2, %3
+ ret i32 %4
+}