summaryrefslogtreecommitdiff
path: root/test/CodeGen/SystemZ/int-cmp-03.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-03.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-03.ll')
-rw-r--r--test/CodeGen/SystemZ/int-cmp-03.ll24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/CodeGen/SystemZ/int-cmp-03.ll b/test/CodeGen/SystemZ/int-cmp-03.ll
index 0246666f06f..7a0007e6724 100644
--- a/test/CodeGen/SystemZ/int-cmp-03.ll
+++ b/test/CodeGen/SystemZ/int-cmp-03.ll
@@ -5,7 +5,7 @@
; Check register comparison.
define double @f1(double %a, double %b, i32 %i1, i32 %i2) {
; CHECK-LABEL: f1:
-; CHECK: clrjl %r2, %r3
+; CHECK: clrbl %r2, %r3, 0(%r14)
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%cond = icmp ult i32 %i1, %i2
@@ -17,7 +17,7 @@ define double @f1(double %a, double %b, i32 %i1, i32 %i2) {
define double @f2(double %a, double %b, i32 %i1, i32 *%ptr) {
; CHECK-LABEL: f2:
; CHECK: cl %r2, 0(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%i2 = load i32 , i32 *%ptr
@@ -30,7 +30,7 @@ define double @f2(double %a, double %b, i32 %i1, i32 *%ptr) {
define double @f3(double %a, double %b, i32 %i1, i32 *%base) {
; CHECK-LABEL: f3:
; CHECK: cl %r2, 4092(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%ptr = getelementptr i32, i32 *%base, i64 1023
@@ -44,7 +44,7 @@ define double @f3(double %a, double %b, i32 %i1, i32 *%base) {
define double @f4(double %a, double %b, i32 %i1, i32 *%base) {
; CHECK-LABEL: f4:
; CHECK: cly %r2, 4096(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%ptr = getelementptr i32, i32 *%base, i64 1024
@@ -58,7 +58,7 @@ define double @f4(double %a, double %b, i32 %i1, i32 *%base) {
define double @f5(double %a, double %b, i32 %i1, i32 *%base) {
; CHECK-LABEL: f5:
; CHECK: cly %r2, 524284(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%ptr = getelementptr i32, i32 *%base, i64 131071
@@ -74,7 +74,7 @@ define double @f6(double %a, double %b, i32 %i1, i32 *%base) {
; CHECK-LABEL: f6:
; CHECK: agfi %r3, 524288
; CHECK: cl %r2, 0(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%ptr = getelementptr i32, i32 *%base, i64 131072
@@ -88,7 +88,7 @@ define double @f6(double %a, double %b, i32 %i1, i32 *%base) {
define double @f7(double %a, double %b, i32 %i1, i32 *%base) {
; CHECK-LABEL: f7:
; CHECK: cly %r2, -4(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%ptr = getelementptr i32, i32 *%base, i64 -1
@@ -102,7 +102,7 @@ define double @f7(double %a, double %b, i32 %i1, i32 *%base) {
define double @f8(double %a, double %b, i32 %i1, i32 *%base) {
; CHECK-LABEL: f8:
; CHECK: cly %r2, -524288(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%ptr = getelementptr i32, i32 *%base, i64 -131072
@@ -118,7 +118,7 @@ define double @f9(double %a, double %b, i32 %i1, i32 *%base) {
; CHECK-LABEL: f9:
; CHECK: agfi %r3, -524292
; CHECK: cl %r2, 0(%r3)
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%ptr = getelementptr i32, i32 *%base, i64 -131073
@@ -132,7 +132,7 @@ define double @f9(double %a, double %b, i32 %i1, i32 *%base) {
define double @f10(double %a, double %b, i32 %i1, i64 %base, i64 %index) {
; CHECK-LABEL: f10:
; CHECK: cl %r2, 4092({{%r4,%r3|%r3,%r4}})
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%add1 = add i64 %base, %index
@@ -148,7 +148,7 @@ define double @f10(double %a, double %b, i32 %i1, i64 %base, i64 %index) {
define double @f11(double %a, double %b, i32 %i1, i64 %base, i64 %index) {
; CHECK-LABEL: f11:
; CHECK: cly %r2, 4096({{%r4,%r3|%r3,%r4}})
-; CHECK-NEXT: jl
+; CHECK-NEXT: blr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%add1 = add i64 %base, %index
@@ -164,7 +164,7 @@ define double @f11(double %a, double %b, i32 %i1, i64 %base, i64 %index) {
define double @f12(double %a, double %b, i32 %i2, i32 *%ptr) {
; CHECK-LABEL: f12:
; CHECK: cl %r2, 0(%r3)
-; CHECK-NEXT: jh {{\.L.*}}
+; CHECK-NEXT: bhr %r14
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%i1 = load i32 , i32 *%ptr