summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/SPARC/64cond.ll
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-05-19 20:33:11 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-05-19 20:33:11 +0000
commit7ca944b9dbcb1f804dad46e2ad02ec60c523b12e (patch)
tree60b25a3c038c3d512b69c8392aa7eaa0078bf826 /llvm/test/CodeGen/SPARC/64cond.ll
parent4a78c86a6a7ca17d31ae4f5d87d939f2d3511b34 (diff)
downloadbcm5719-llvm-7ca944b9dbcb1f804dad46e2ad02ec60c523b12e.tar.gz
bcm5719-llvm-7ca944b9dbcb1f804dad46e2ad02ec60c523b12e.zip
Add floating point selects on %xcc predicates.
llvm-svn: 182222
Diffstat (limited to 'llvm/test/CodeGen/SPARC/64cond.ll')
-rw-r--r--llvm/test/CodeGen/SPARC/64cond.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SPARC/64cond.ll b/llvm/test/CodeGen/SPARC/64cond.ll
index fa66d73edd5..c19da23766a 100644
--- a/llvm/test/CodeGen/SPARC/64cond.ll
+++ b/llvm/test/CodeGen/SPARC/64cond.ll
@@ -65,3 +65,25 @@ entry:
%rv = select i1 %tobool, i64 %a, i64 %b
ret i64 %rv
}
+
+; CHECK: selectf32_xcc
+; CHECK: subcc %i0, %i1
+; CHECK: fmovsg %xcc, %f5, %f7
+; CHECK: fmovs %f7, %f1
+define float @selectf32_xcc(i64 %x, i64 %y, float %a, float %b) {
+entry:
+ %tobool = icmp sgt i64 %x, %y
+ %rv = select i1 %tobool, float %a, float %b
+ ret float %rv
+}
+
+; CHECK: selectf64_xcc
+; CHECK: subcc %i0, %i1
+; CHECK: fmovdg %xcc, %f4, %f6
+; CHECK: fmovd %f6, %f0
+define double @selectf64_xcc(i64 %x, i64 %y, double %a, double %b) {
+entry:
+ %tobool = icmp sgt i64 %x, %y
+ %rv = select i1 %tobool, double %a, double %b
+ ret double %rv
+}
OpenPOWER on IntegriCloud