diff options
| author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-07 11:03:34 +0000 |
|---|---|---|
| committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-07 11:03:34 +0000 |
| commit | 9f11bc1956abeb654dbc98d9859a3fa3b8661b13 (patch) | |
| tree | 5ebe9a07d5574414fe0d08695314963283da9779 /llvm/test/CodeGen/SystemZ/fp-cmp-02.ll | |
| parent | f502fd75ab60d18bd7bc942fe486214898b6224e (diff) | |
| download | bcm5719-llvm-9f11bc1956abeb654dbc98d9859a3fa3b8661b13.tar.gz bcm5719-llvm-9f11bc1956abeb654dbc98d9859a3fa3b8661b13.zip | |
[SystemZ] Add floating-point load-and-test instructions
These instructions can also be used as comparisons with zero.
llvm-svn: 187882
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/fp-cmp-02.ll')
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/fp-cmp-02.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/fp-cmp-02.ll b/llvm/test/CodeGen/SystemZ/fp-cmp-02.ll index 48374a722bb..309d12e824a 100644 --- a/llvm/test/CodeGen/SystemZ/fp-cmp-02.ll +++ b/llvm/test/CodeGen/SystemZ/fp-cmp-02.ll @@ -147,3 +147,15 @@ define double @f7(double *%ptr0) { ret double %sel10 } + +; Check comparison with zero. +define i64 @f8(i64 %a, i64 %b, double %f) { +; CHECK-LABEL: f8: +; CHECK: ltdbr %f0, %f0 +; CHECK-NEXT: je +; CHECK: lgr %r2, %r3 +; CHECK: br %r14 + %cond = fcmp oeq double %f, 0.0 + %res = select i1 %cond, i64 %a, i64 %b + ret i64 %res +} |

