]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/PowerPC/vsx-args.ll
Vendor import of llvm RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
[FreeBSD/FreeBSD.git] / test / CodeGen / PowerPC / vsx-args.ll
1 ; RUN: llc < %s -mcpu=pwr7 -mattr=+vsx | FileCheck %s
2 target datalayout = "E-m:e-i64:64-n32:64"
3 target triple = "powerpc64-unknown-linux-gnu"
4
5 declare <2 x double> @sv(<2 x double>, <2 x i64>, <4 x float>) #0
6
7 define <2 x double> @main(<4 x float> %a, <2 x double> %b, <2 x i64> %c) #1 {
8 entry:
9   %ca = tail call <2 x double> @sv(<2 x double> %b, <2 x i64> %c,  <4 x float> %a)
10   %v = fadd <2 x double> %ca, <double 1.0, double 1.0>
11   ret <2 x double> %v
12
13 ; CHECK-LABEL: @main
14 ; CHECK-DAG: vor [[V:[0-9]+]], 2, 2
15 ; CHECK-DAG: xxlor 34, 35, 35
16 ; CHECK-DAG: xxlor 35, 36, 36
17 ; CHECK-DAG: vor 4, [[V]], [[V]]
18 ; CHECK-DAG: bl sv
19 ; CHECK-DAG: lxvd2x [[VC:[0-9]+]],
20 ; CHECK: xvadddp 34, 34, [[VC]]
21 ; CHECK: blr
22 }
23
24 attributes #0 = { noinline nounwind readnone }
25 attributes #1 = { nounwind }
26