diff options
Diffstat (limited to 'test/CodeGen/SystemZ/int-cmp-09.ll')
| -rw-r--r-- | test/CodeGen/SystemZ/int-cmp-09.ll | 57 |
1 files changed, 38 insertions, 19 deletions
diff --git a/test/CodeGen/SystemZ/int-cmp-09.ll b/test/CodeGen/SystemZ/int-cmp-09.ll index 0eb8c6688c0c..cd0ace2a9a94 100644 --- a/test/CodeGen/SystemZ/int-cmp-09.ll +++ b/test/CodeGen/SystemZ/int-cmp-09.ll @@ -9,7 +9,8 @@ define double @f1(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, 0 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -20,7 +21,8 @@ define double @f2(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, 2 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -31,7 +33,8 @@ define double @f3(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, 127 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -43,7 +46,8 @@ define double @f4(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, 128 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -55,7 +59,8 @@ define double @f5(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, 32767 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -67,7 +72,8 @@ define double @f6(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, 32768 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -79,7 +85,8 @@ define double @f7(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp eq i32 %i1, 2147483647 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -91,7 +98,8 @@ define double @f8(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp eq i32 %i1, 2147483648 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -102,7 +110,8 @@ define double @f9(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, -1 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -113,7 +122,8 @@ define double @f10(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, -128 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -125,7 +135,8 @@ define double @f11(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, -129 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -137,7 +148,8 @@ define double @f12(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, -32768 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -149,7 +161,8 @@ define double @f13(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, -32769 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -161,7 +174,8 @@ define double @f14(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp eq i32 %i1, -2147483648 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -173,7 +187,8 @@ define double @f15(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp eq i32 %i1, -2147483649 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -184,7 +199,8 @@ define double @f16(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, 1 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -195,7 +211,8 @@ define double @f17(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp sge i32 %i1, 1 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -206,7 +223,8 @@ define double @f18(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp sgt i32 %i1, -1 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } @@ -217,6 +235,7 @@ define double @f19(double %a, double %b, i32 %i1) { ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp sle i32 %i1, -1 - %res = select i1 %cond, double %a, double %b + %tmp = select i1 %cond, double %a, double %b + %res = fadd double %tmp, 1.0 ret double %res } |
