• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -verify-machineinstrs < %s -mcpu=pwr7 -mattr=+vsx | FileCheck %s
2; RUN: llc -verify-machineinstrs < %s -mcpu=pwr7 -mattr=+vsx -fast-isel -O0 | \
3; RUN:   FileCheck -check-prefix=CHECK-FISL %s
4target datalayout = "E-m:e-i64:64-n32:64"
5target triple = "powerpc64-unknown-linux-gnu"
6
7declare <2 x double> @sv(<2 x double>, <2 x i64>, <4 x float>) #0
8
9define <2 x double> @main(<4 x float> %a, <2 x double> %b, <2 x i64> %c) #1 {
10entry:
11  %ca = tail call <2 x double> @sv(<2 x double> %b, <2 x i64> %c,  <4 x float> %a)
12  %v = fadd <2 x double> %ca, <double 1.0, double 1.0>
13  ret <2 x double> %v
14
15; CHECK-LABEL: @main
16; CHECK-DAG: vmr [[V:[0-9]+]], 2
17; CHECK-DAG: vmr 2, 3
18; CHECK-DAG: vmr 3, 4
19; CHECK-DAG: vmr 4, [[V]]
20; CHECK: bl sv
21; CHECK: lxvd2x [[VC:[0-9]+]],
22; CHECK: xvadddp 34, 34, [[VC]]
23; CHECK: blr
24
25; CHECK-FISL-LABEL: @main
26; CHECK-FISL: stxvd2x 34
27; CHECK-FISL: vmr 2, 3
28; CHECK-FISL: vmr 3, 4
29; CHECK-FISL: lxvd2x 36
30; CHECK-FISL: bl sv
31; CHECK-FISL: lxvd2x [[VC:[0-9]+]],
32; CHECK-FISL: xvadddp 34, 34, [[VC]]
33; CHECK-FISL: blr
34}
35
36attributes #0 = { noinline nounwind readnone }
37attributes #1 = { nounwind }
38
39