• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mcpu=a2q | FileCheck %s
2target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
3target triple = "powerpc64-bgq-linux"
4
5define <4 x double> @foo(<4 x double>* %a) {
6entry:
7  %r = load <4 x double>, <4 x double>* %a, align 32
8  ret <4 x double> %r
9; CHECK: qvlfdx
10; CHECK: blr
11}
12
13define <4 x double> @bar(<4 x double>* %a) {
14entry:
15  %r = load <4 x double>, <4 x double>* %a, align 8
16  %b = getelementptr <4 x double>, <4 x double>* %a, i32 16
17  %s = load <4 x double>, <4 x double>* %b, align 32
18  %t = fadd <4 x double> %r, %s
19  ret <4 x double> %t
20; CHECK: qvlpcldx
21; CHECK: qvlfdx
22; CHECK: qvfperm
23; CHECK: blr
24}
25
26define <4 x double> @bar1(<4 x double>* %a) {
27entry:
28  %r = load <4 x double>, <4 x double>* %a, align 8
29  %b = getelementptr <4 x double>, <4 x double>* %a, i32 16
30  %s = load <4 x double>, <4 x double>* %b, align 8
31  %t = fadd <4 x double> %r, %s
32  ret <4 x double> %t
33}
34
35define <4 x double> @bar2(<4 x double>* %a) {
36entry:
37  %r = load <4 x double>, <4 x double>* %a, align 8
38  %b = getelementptr <4 x double>, <4 x double>* %a, i32 1
39  %s = load <4 x double>, <4 x double>* %b, align 32
40  %t = fadd <4 x double> %r, %s
41  ret <4 x double> %t
42}
43
44define <4 x double> @bar3(<4 x double>* %a) {
45entry:
46  %r = load <4 x double>, <4 x double>* %a, align 8
47  %b = getelementptr <4 x double>, <4 x double>* %a, i32 1
48  %s = load <4 x double>, <4 x double>* %b, align 8
49  %t = fadd <4 x double> %r, %s
50  ret <4 x double> %t
51}
52
53define <4 x double> @bar4(<4 x double>* %a) {
54entry:
55  %r = load <4 x double>, <4 x double>* %a, align 8
56  %b = getelementptr <4 x double>, <4 x double>* %a, i32 1
57  %s = load <4 x double>, <4 x double>* %b, align 8
58  %c = getelementptr <4 x double>, <4 x double>* %b, i32 1
59  %t = load <4 x double>, <4 x double>* %c, align 8
60  %u = fadd <4 x double> %r, %s
61  %v = fadd <4 x double> %u, %t
62  ret <4 x double> %v
63}
64
65