aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/SPARC
diff options
context:
space:
mode:
authorVenkatraman Govindaraju <venkatra@cs.wisc.edu>2013-10-04 23:54:30 +0000
committerVenkatraman Govindaraju <venkatra@cs.wisc.edu>2013-10-04 23:54:30 +0000
commit1c9524b6249ab01c71856e69c4f7071236cf54ed (patch)
treed71e5c1fa373c972c242358e05c480036d8fe08e /test/CodeGen/SPARC
parentc4eb353c7a15f8b0283f4772dcac0571b7cc3350 (diff)
downloadexternal_llvm-1c9524b6249ab01c71856e69c4f7071236cf54ed.zip
external_llvm-1c9524b6249ab01c71856e69c4f7071236cf54ed.tar.gz
external_llvm-1c9524b6249ab01c71856e69c4f7071236cf54ed.tar.bz2
[Sparc] Correct the floating point conditional code mapping in GetOppositeBranchCondition().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192006 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SPARC')
-rw-r--r--test/CodeGen/SPARC/2011-01-11-CC.ll32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/2011-01-11-CC.ll b/test/CodeGen/SPARC/2011-01-11-CC.ll
index edbcb49..ba90ca1 100644
--- a/test/CodeGen/SPARC/2011-01-11-CC.ll
+++ b/test/CodeGen/SPARC/2011-01-11-CC.ll
@@ -103,3 +103,35 @@ entry:
%1 = select i1 %0, double %f1, double %f2
ret double %1
}
+
+define i32 @test_float_cc(double %a, double %b, i32 %c, i32 %d) {
+entry:
+; V8-LABEL: test_float_cc
+; V8: fcmpd
+; V8: {{fbl|fbuge}} .LBB
+; V8: fcmpd
+; V8: {{fbule|fbg}} .LBB
+
+; V9-LABEL: test_float_cc
+; V9: fcmpd
+; V9: {{fbl|fbuge}} .LBB
+; V9: fcmpd
+; V9: {{fbule|fbg}} .LBB
+
+ %0 = fcmp uge double %a, 0.000000e+00
+ br i1 %0, label %loop, label %loop.2
+
+loop:
+ %1 = icmp eq i32 %c, 10
+ br i1 %1, label %loop, label %exit.0
+
+loop.2:
+ %2 = fcmp ogt double %b, 0.000000e+00
+ br i1 %2, label %exit.1, label %loop
+
+exit.0:
+ ret i32 0
+
+exit.1:
+ ret i32 1
+}