diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-08-21 20:02:37 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-08-21 20:02:37 +0000 |
commit | f31a44ec01f9035aef4d79f7ba515398557fcc1a (patch) | |
tree | 3835c21584072f95780ac1515b05d1a40dd677b1 /llvm/test | |
parent | 2dd877d12ad4f2fe0f95624916e7bf3de5f84b28 (diff) | |
download | bcm5719-llvm-f31a44ec01f9035aef4d79f7ba515398557fcc1a.tar.gz bcm5719-llvm-f31a44ec01f9035aef4d79f7ba515398557fcc1a.zip |
Add fcopysign instructions
llvm-svn: 79664
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/SystemZ/2009-08-22-FCopySign.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/2009-08-22-FCopySign.ll b/llvm/test/CodeGen/SystemZ/2009-08-22-FCopySign.ll new file mode 100644 index 00000000000..caa8065517d --- /dev/null +++ b/llvm/test/CodeGen/SystemZ/2009-08-22-FCopySign.ll @@ -0,0 +1,22 @@ +; RUN: llvm-as < %s | llc | FileCheck %s + +target datalayout = "E-p:64:64:64-i1:8:8-i8:8:16-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:16:16-f128:128:128" +target triple = "s390x-ibm-linux-gnu" + +define double @foo(double %a, double %b) nounwind { +entry: +; CHECK: cpsdr %f0, %f2, %f0 + %0 = tail call double @copysign(double %a, double %b) nounwind readnone + ret double %0 +} + +define float @bar(float %a, float %b) nounwind { +entry: +; CHECK: cpsdr %f0, %f2, %f0 + %0 = tail call float @copysignf(float %a, float %b) nounwind readnone + ret float %0 +} + + +declare double @copysign(double, double) nounwind readnone +declare float @copysignf(float, float) nounwind readnone |