diff options
| author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2015-03-31 12:52:27 +0000 |
|---|---|---|
| committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2015-03-31 12:52:27 +0000 |
| commit | 1f6666a49c9a8cc773e81545d8cd70b047b73672 (patch) | |
| tree | 47b195856a4fa125b0b24a49ac13af3e55dc1d70 /llvm/test | |
| parent | 6c66ad0d7500458884931437e0f54e215b0ec1f2 (diff) | |
| download | bcm5719-llvm-1f6666a49c9a8cc773e81545d8cd70b047b73672.tar.gz bcm5719-llvm-1f6666a49c9a8cc773e81545d8cd70b047b73672.zip | |
[SystemZ] Provide basic TargetTransformInfo implementation
This hooks up the TargetTransformInfo machinery for SystemZ,
and provides an implementation of getIntImmCost.
In addition, the patch adds the isLegalICmpImmediate and
isLegalAddImmediate TargetLowering overrides, and updates
a couple of test cases where we now generate slightly
better code.
llvm-svn: 233688
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/int-cmp-12.ll | 15 | ||||
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/int-cmp-47.ll | 3 |
2 files changed, 15 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/SystemZ/int-cmp-12.ll b/llvm/test/CodeGen/SystemZ/int-cmp-12.ll index 077b22423e0..d9c6a9fc4ef 100644 --- a/llvm/test/CodeGen/SystemZ/int-cmp-12.ll +++ b/llvm/test/CodeGen/SystemZ/int-cmp-12.ll @@ -49,13 +49,24 @@ define double @f4(double %a, double %b, i64 %i1) { ret double %res } -; Check the next value up, which must use a register comparison. +; Check the next value up, which can use a shifted comparison define double @f5(double %a, double %b, i64 %i1) { ; CHECK-LABEL: f5: -; CHECK: clgrjl %r2, +; CHECK: srlg [[REG:%r[0-5]]], %r2, 32 +; CHECK: cgije [[REG]], 0 ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp ult i64 %i1, 4294967296 %res = select i1 %cond, double %a, double %b ret double %res } +; Check the next value up, which must use a register comparison. +define double @f6(double %a, double %b, i64 %i1) { +; CHECK-LABEL: f6: +; CHECK: clgrjl %r2, +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp ult i64 %i1, 4294967297 + %res = select i1 %cond, double %a, double %b + ret double %res +} diff --git a/llvm/test/CodeGen/SystemZ/int-cmp-47.ll b/llvm/test/CodeGen/SystemZ/int-cmp-47.ll index 038a25b2a6e..274350d24de 100644 --- a/llvm/test/CodeGen/SystemZ/int-cmp-47.ll +++ b/llvm/test/CodeGen/SystemZ/int-cmp-47.ll @@ -309,7 +309,8 @@ exit: define void @f17(i64 %a) { ; CHECK-LABEL: f17: ; CHECK-NOT: tmhh -; CHECK: llihh {{%r[0-5]}}, 49151 +; CHECK: srlg [[REG:%r[0-5]]], %r2, 48 +; CHECK: cgfi [[REG]], 49151 ; CHECK-NOT: tmhh ; CHECK: br %r14 entry: |

