1 ; Verify that we use the vector ABI datalayout if and only if 2 ; the vector facility is present. 3 ; 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 16 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 31 32 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -mattr=-vector | \ 33 ; RUN: FileCheck -check-prefix=CHECK-NOVECTOR %s 34 35 %struct.S = type { i8, <2 x i64> } 36 37 define void @test(%struct.S* %s) nounwind { 38 ; CHECK-VECTOR-LABEL: @test 39 ; CHECK-VECTOR: vl %v0, 8(%r2) 40 ; CHECK-NOVECTOR-LABEL: @test 41 ; CHECK-NOVECTOR-DAG: agsi 16(%r2), 1 42 ; CHECK-NOVECTOR-DAG: agsi 24(%r2), 1 43 %ptr = getelementptr %struct.S, %struct.S* %s, i64 0, i32 1 44 %vec = load <2 x i64>, <2 x i64>* %ptr 45 %add = add <2 x i64> %vec, <i64 1, i64 1> 46 store <2 x i64> %add, <2 x i64>* %ptr 47 ret void 48 } 49 50