summaryrefslogtreecommitdiff
path: root/test/CodeGen/SystemZ/int-cmp-08.ll
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2016-04-07 16:11:44 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2016-04-07 16:11:44 +0000
commit05fbbee99ef2dad65bccf1dd2a8ebbf0e36dcdea (patch)
tree9f0427553ad9bbeb0bd3643546740f92c6a8c762 /test/CodeGen/SystemZ/int-cmp-08.ll
parenta2a5c796cb6f7870e68daac2abded302d12cf458 (diff)
[SystemZ] Implement conditional returns
Return is now considered a predicable instruction, and is converted to a newly-added CondReturn (which maps to BCR to %r14) instruction by the if conversion pass. Also, fused compare-and-branch transform knows about conditional returns, emitting the proper fused instructions for them. This transform triggers on a *lot* of tests, hence the huge diffstat. The changes are mostly jX to br %r14 -> bXr %r14. Author: koriakin Differential Revision: http://reviews.llvm.org/D17339 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265689 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SystemZ/int-cmp-08.ll')
-rw-r--r--test/CodeGen/SystemZ/int-cmp-08.ll18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/CodeGen/SystemZ/int-cmp-08.ll b/test/CodeGen/SystemZ/int-cmp-08.ll
index 384b41b549b..fc60993df0e 100644
--- a/test/CodeGen/SystemZ/int-cmp-08.ll
+++ b/test/CodeGen/SystemZ/int-cmp-08.ll
@@ -5,7 +5,7 @@
; Check CLGR.
define double @f1(double %a, double %b, i64 %i1, i64 %i2) {
; CHECK-LABEL: f1:
-; CHECK: clgrjl %r2, %r3
+; CHECK: clgrbl %r2, %r3, 0(%r14)
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%cond = icmp ult i64 %i1, %i2
@@ -17,7 +17,7 @@ define double @f1(double %a, double %b, i64 %i1, i64 %i2) {
define double @f2(double %a, double %b, i64 %i1, i64 *%ptr) {
; CHECK-LABEL: f2:
; CHECK: clg %r2, 0(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%i2 = load i64 , i64 *%ptr
@@ -30,7 +30,7 @@ define double @f2(double %a, double %b, i64 %i1, i64 *%ptr) {
define double @f3(double %a, double %b, i64 %i1, i64 *%base) {
; CHECK-LABEL: f3:
; CHECK: clg %r2, 524280(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%ptr = getelementptr i64, i64 *%base, i64 65535
@@ -46,7 +46,7 @@ define double @f4(double %a, double %b, i64 %i1, i64 *%base) {
; CHECK-LABEL: f4:
; CHECK: agfi %r3, 524288
; CHECK: clg %r2, 0(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%ptr = getelementptr i64, i64 *%base, i64 65536
@@ -60,7 +60,7 @@ define double @f4(double %a, double %b, i64 %i1, i64 *%base) {
define double @f5(double %a, double %b, i64 %i1, i64 *%base) {
; CHECK-LABEL: f5:
; CHECK: clg %r2, -8(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%ptr = getelementptr i64, i64 *%base, i64 -1
@@ -74,7 +74,7 @@ define double @f5(double %a, double %b, i64 %i1, i64 *%base) {
define double @f6(double %a, double %b, i64 %i1, i64 *%base) {
; CHECK-LABEL: f6:
; CHECK: clg %r2, -524288(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%ptr = getelementptr i64, i64 *%base, i64 -65536
@@ -90,7 +90,7 @@ define double @f7(double %a, double %b, i64 %i1, i64 *%base) {
; CHECK-LABEL: f7:
; CHECK: agfi %r3, -524296
; CHECK: clg %r2, 0(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%ptr = getelementptr i64, i64 *%base, i64 -65537
@@ -104,7 +104,7 @@ define double @f7(double %a, double %b, i64 %i1, i64 *%base) {
define double @f8(double %a, double %b, i64 %i1, i64 %base, i64 %index) {
; CHECK-LABEL: f8:
; CHECK: clg %r2, 524280({{%r4,%r3|%r3,%r4}})
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%add1 = add i64 %base, %index
@@ -120,7 +120,7 @@ define double @f8(double %a, double %b, i64 %i1, i64 %base, i64 %index) {
define double @f9(double %a, double %b, i64 %i2, i64 *%ptr) {
; CHECK-LABEL: f9:
; CHECK: clg %r2, 0(%r3)
-; CHECK-NEXT: jh {{\.L.*}}
+; CHECK-NEXT: bhr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%i1 = load i64 , i64 *%ptr