summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/SPARC
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
commitf1d807ee1338d853c4550271c3057fb2161216ef (patch)
treebc8d166ad48d87954f08c78264b16454821cc5ac /llvm/test/CodeGen/SPARC
parent3e0c21ed53c7675b9c041e4aaec3523f4a7e86e5 (diff)
downloadbcm5719-llvm-f1d807ee1338d853c4550271c3057fb2161216ef.tar.gz
bcm5719-llvm-f1d807ee1338d853c4550271c3057fb2161216ef.zip
[Sparc] Expand FP_TO_UINT, UINT_TO_FP for fp128.
llvm-svn: 193947
Diffstat (limited to 'llvm/test/CodeGen/SPARC')
-rw-r--r--llvm/test/CodeGen/SPARC/fp128.ll32
1 files changed, 32 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SPARC/fp128.ll b/llvm/test/CodeGen/SPARC/fp128.ll
index 7820b766388..8049dbe98c4 100644
--- a/llvm/test/CodeGen/SPARC/fp128.ll
+++ b/llvm/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
+}
OpenPOWER on IntegriCloud