~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/SystemZ/vec-const-12.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; Test vector replicates, v2f64 version.
 
2
;
 
3
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
 
4
 
 
5
; Test a byte-granularity replicate with the lowest useful value.
 
6
define <2 x double> @f1() {
 
7
; CHECK-LABEL: f1:
 
8
; CHECK: vrepib %v24, 1
 
9
; CHECK: br %r14
 
10
  ret <2 x double> <double 0x0101010101010101, double 0x0101010101010101>
 
11
}
 
12
 
 
13
; Test a byte-granularity replicate with an arbitrary value.
 
14
define <2 x double> @f2() {
 
15
; CHECK-LABEL: f2:
 
16
; CHECK: vrepib %v24, -55
 
17
; CHECK: br %r14
 
18
  ret <2 x double> <double 0xc9c9c9c9c9c9c9c9, double 0xc9c9c9c9c9c9c9c9>
 
19
}
 
20
 
 
21
; Test a byte-granularity replicate with the highest useful value.
 
22
define <2 x double> @f3() {
 
23
; CHECK-LABEL: f3:
 
24
; CHECK: vrepib %v24, -2
 
25
; CHECK: br %r14
 
26
  ret <2 x double> <double 0xfefefefefefefefe, double 0xfefefefefefefefe>
 
27
}
 
28
 
 
29
; Test a halfword-granularity replicate with the lowest useful value.
 
30
define <2 x double> @f4() {
 
31
; CHECK-LABEL: f4:
 
32
; CHECK: vrepih %v24, 1
 
33
; CHECK: br %r14
 
34
  ret <2 x double> <double 0x0001000100010001, double 0x0001000100010001>
 
35
}
 
36
 
 
37
; Test a halfword-granularity replicate with an arbitrary value.
 
38
define <2 x double> @f5() {
 
39
; CHECK-LABEL: f5:
 
40
; CHECK: vrepih %v24, 25650
 
41
; CHECK: br %r14
 
42
  ret <2 x double> <double 0x6432643264326432, double 0x6432643264326432>
 
43
}
 
44
 
 
45
; Test a halfword-granularity replicate with the highest useful value.
 
46
define <2 x double> @f6() {
 
47
; CHECK-LABEL: f6:
 
48
; CHECK: vrepih %v24, -2
 
49
; CHECK: br %r14
 
50
  ret <2 x double> <double 0xfffefffefffefffe, double 0xfffefffefffefffe>
 
51
}
 
52
 
 
53
; Test a word-granularity replicate with the lowest useful positive value.
 
54
define <2 x double> @f7() {
 
55
; CHECK-LABEL: f7:
 
56
; CHECK: vrepif %v24, 1
 
57
; CHECK: br %r14
 
58
  ret <2 x double> <double 0x0000000100000001, double 0x0000000100000001>
 
59
}
 
60
 
 
61
; Test a word-granularity replicate with the highest in-range value.
 
62
define <2 x double> @f8() {
 
63
; CHECK-LABEL: f8:
 
64
; CHECK: vrepif %v24, 32767
 
65
; CHECK: br %r14
 
66
  ret <2 x double> <double 0x00007fff00007fff, double 0x00007fff00007fff>
 
67
}
 
68
 
 
69
; Test a word-granularity replicate with the next highest value.
 
70
; This cannot use VREPIF.
 
71
define <2 x double> @f9() {
 
72
; CHECK-LABEL: f9:
 
73
; CHECK-NOT: vrepif
 
74
; CHECK: br %r14
 
75
  ret <2 x double> <double 0x0000800000008000, double 0x0000800000008000>
 
76
}
 
77
 
 
78
; Test a word-granularity replicate with the lowest in-range value.
 
79
define <2 x double> @f10() {
 
80
; CHECK-LABEL: f10:
 
81
; CHECK: vrepif %v24, -32768
 
82
; CHECK: br %r14
 
83
  ret <2 x double> <double 0xffff8000ffff8000, double 0xffff8000ffff8000>
 
84
}
 
85
 
 
86
; Test a word-granularity replicate with the next lowest value.
 
87
; This cannot use VREPIF.
 
88
define <2 x double> @f11() {
 
89
; CHECK-LABEL: f11:
 
90
; CHECK-NOT: vrepif
 
91
; CHECK: br %r14
 
92
  ret <2 x double> <double 0xffff7fffffff7fff, double 0xffff7fffffff7fff>
 
93
}
 
94
 
 
95
; Test a word-granularity replicate with the highest useful negative value.
 
96
define <2 x double> @f12() {
 
97
; CHECK-LABEL: f12:
 
98
; CHECK: vrepif %v24, -2
 
99
; CHECK: br %r14
 
100
  ret <2 x double> <double 0xfffffffefffffffe, double 0xfffffffefffffffe>
 
101
}
 
102
 
 
103
; Test a doubleword-granularity replicate with the lowest useful positive
 
104
; value.
 
105
define <2 x double> @f13() {
 
106
; CHECK-LABEL: f13:
 
107
; CHECK: vrepig %v24, 1
 
108
; CHECK: br %r14
 
109
  ret <2 x double> <double 0x0000000000000001, double 0x0000000000000001>
 
110
}
 
111
 
 
112
; Test a doubleword-granularity replicate with the highest in-range value.
 
113
define <2 x double> @f14() {
 
114
; CHECK-LABEL: f14:
 
115
; CHECK: vrepig %v24, 32767
 
116
; CHECK: br %r14
 
117
  ret <2 x double> <double 0x0000000000007fff, double 0x0000000000007fff>
 
118
}
 
119
 
 
120
; Test a doubleword-granularity replicate with the next highest value.
 
121
; This cannot use VREPIG.
 
122
define <2 x double> @f15() {
 
123
; CHECK-LABEL: f15:
 
124
; CHECK-NOT: vrepig
 
125
; CHECK: br %r14
 
126
  ret <2 x double> <double 0x0000000000008000, double 0x0000000000008000>
 
127
}
 
128
 
 
129
; Test a doubleword-granularity replicate with the lowest in-range value.
 
130
define <2 x double> @f16() {
 
131
; CHECK-LABEL: f16:
 
132
; CHECK: vrepig %v24, -32768
 
133
; CHECK: br %r14
 
134
  ret <2 x double> <double 0xffffffffffff8000, double 0xffffffffffff8000>
 
135
}
 
136
 
 
137
; Test a doubleword-granularity replicate with the next lowest value.
 
138
; This cannot use VREPIG.
 
139
define <2 x double> @f17() {
 
140
; CHECK-LABEL: f17:
 
141
; CHECK-NOT: vrepig
 
142
; CHECK: br %r14
 
143
  ret <2 x double> <double 0xffffffffffff7fff, double 0xffffffffffff7fff>
 
144
}
 
145
 
 
146
; Test a doubleword-granularity replicate with the highest useful negative
 
147
; value.
 
148
define <2 x double> @f18() {
 
149
; CHECK-LABEL: f18:
 
150
; CHECK: vrepig %v24, -2
 
151
; CHECK: br %r14
 
152
  ret <2 x double> <double 0xfffffffffffffffe, double 0xfffffffffffffffe>
 
153
}
 
154
 
 
155
; Repeat f14 with undefs optimistically treated as 32767.
 
156
define <2 x double> @f19() {
 
157
; CHECK-LABEL: f19:
 
158
; CHECK: vrepig %v24, 32767
 
159
; CHECK: br %r14
 
160
  ret <2 x double> <double undef, double 0x0000000000007fff>
 
161
}
 
162
 
 
163
; Repeat f18 with undefs optimistically treated as -2.
 
164
define <2 x double> @f20() {
 
165
; CHECK-LABEL: f20:
 
166
; CHECK: vrepig %v24, -2
 
167
; CHECK: br %r14
 
168
  ret <2 x double> <double undef, double 0xfffffffffffffffe>
 
169
}