diff options
author | Stephen Hines <srhines@google.com> | 2014-12-01 14:51:49 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-12-02 16:08:10 -0800 |
commit | 37ed9c199ca639565f6ce88105f9e39e898d82d0 (patch) | |
tree | 8fb36d3910e3ee4c4e1b7422f4f017108efc52f5 /test/CodeGen/PowerPC/vsx-div.ll | |
parent | d2327b22152ced7bc46dc629fc908959e8a52d03 (diff) | |
download | external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.zip external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.gz external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.bz2 |
Update aosp/master LLVM for rebase to r222494.
Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
Diffstat (limited to 'test/CodeGen/PowerPC/vsx-div.ll')
-rw-r--r-- | test/CodeGen/PowerPC/vsx-div.ll | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/vsx-div.ll b/test/CodeGen/PowerPC/vsx-div.ll new file mode 100644 index 0000000..8a9578e --- /dev/null +++ b/test/CodeGen/PowerPC/vsx-div.ll @@ -0,0 +1,29 @@ +; RUN: llc -mcpu=pwr7 -mattr=+vsx -O1 -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s + +@vf = global <4 x float> <float -1.500000e+00, float 2.500000e+00, float -3.500000e+00, float 4.500000e+00>, align 16 +@vd = global <2 x double> <double 3.500000e+00, double -7.500000e+00>, align 16 +@vf_res = common global <4 x float> zeroinitializer, align 16 +@vd_res = common global <2 x double> zeroinitializer, align 16 + +define void @test1() { +entry: + %0 = load <4 x float>* @vf, align 16 + %1 = tail call <4 x float> @llvm.ppc.vsx.xvdivsp(<4 x float> %0, <4 x float> %0) + store <4 x float> %1, <4 x float>* @vf_res, align 16 + ret void +} +; CHECK-LABEL: @test1 +; CHECK: xvdivsp + +define void @test2() { +entry: + %0 = load <2 x double>* @vd, align 16 + %1 = tail call <2 x double> @llvm.ppc.vsx.xvdivdp(<2 x double> %0, <2 x double> %0) + store <2 x double> %1, <2 x double>* @vd_res, align 16 + ret void +} +; CHECK-LABEL: @test2 +; CHECK: xvdivdp + +declare <2 x double> @llvm.ppc.vsx.xvdivdp(<2 x double>, <2 x double>) +declare <4 x float> @llvm.ppc.vsx.xvdivsp(<4 x float>, <4 x float>) |