1 ; Verify that we use the vector ABI datalayout if and only if
2 ; the vector facility is present.
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu | \
5 ; RUN: FileCheck -check-prefix=CHECK-NOVECTOR %s
6 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=generic | \
7 ; RUN: FileCheck -check-prefix=CHECK-NOVECTOR %s
8 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | \
9 ; RUN: FileCheck -check-prefix=CHECK-NOVECTOR %s
10 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 | \
11 ; RUN: FileCheck -check-prefix=CHECK-NOVECTOR %s
12 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=zEC12 | \
13 ; RUN: FileCheck -check-prefix=CHECK-NOVECTOR %s
14 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | \
15 ; RUN: FileCheck -check-prefix=CHECK-VECTOR %s
17 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=vector | \
18 ; RUN: FileCheck -check-prefix=CHECK-VECTOR %s
19 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=+vector | \
20 ; RUN: FileCheck -check-prefix=CHECK-VECTOR %s
21 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=-vector,vector | \
22 ; RUN: FileCheck -check-prefix=CHECK-VECTOR %s
23 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=-vector,+vector | \
24 ; RUN: FileCheck -check-prefix=CHECK-VECTOR %s
25 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=-vector | \
26 ; RUN: FileCheck -check-prefix=CHECK-NOVECTOR %s
27 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=vector,-vector | \
28 ; RUN: FileCheck -check-prefix=CHECK-NOVECTOR %s
29 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=+vector,-vector | \
30 ; RUN: FileCheck -check-prefix=CHECK-NOVECTOR %s
32 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -mattr=-vector | \
33 ; RUN: FileCheck -check-prefix=CHECK-NOVECTOR %s
35 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -mattr=+soft-float | \
36 ; RUN: FileCheck -check-prefix=CHECK-NOVECTOR %s
37 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 \
38 ; RUN: -mattr=soft-float,-soft-float | \
39 ; RUN: FileCheck -check-prefix=CHECK-VECTOR %s
40 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 \
41 ; RUN: -mattr=-soft-float,soft-float | \
42 ; RUN: FileCheck -check-prefix=CHECK-NOVECTOR %s
44 %struct.S = type { i8, <2 x i64> }
46 define void @test(%struct.S* %s) nounwind {
47 ; CHECK-VECTOR-LABEL: @test
48 ; CHECK-VECTOR: vl %v0, 8(%r2)
49 ; CHECK-NOVECTOR-LABEL: @test
50 ; CHECK-NOVECTOR-DAG: agsi 16(%r2), 1
51 ; CHECK-NOVECTOR-DAG: agsi 24(%r2), 1
52 %ptr = getelementptr %struct.S, %struct.S* %s, i64 0, i32 1
53 %vec = load <2 x i64>, <2 x i64>* %ptr
54 %add = add <2 x i64> %vec, <i64 1, i64 1>
55 store <2 x i64> %add, <2 x i64>* %ptr