77 lines · plain
1; Verify that a struct as generated by the frontend is correctly accessed in2; both cases of enabling/disabling the vector facility.3;4; RUN: llc < %s -mtriple=s390x-linux-gnu | \5; RUN: FileCheck -check-prefixes=CHECK,CHECK-NOVECTOR %s6; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=generic | \7; RUN: FileCheck -check-prefixes=CHECK,CHECK-NOVECTOR %s8; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | \9; RUN: FileCheck -check-prefixes=CHECK,CHECK-NOVECTOR %s10; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 | \11; RUN: FileCheck -check-prefixes=CHECK,CHECK-NOVECTOR %s12; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=zEC12 | \13; RUN: FileCheck -check-prefixes=CHECK,CHECK-NOVECTOR %s14; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | \15; RUN: FileCheck -check-prefixes=CHECK,CHECK-VECTOR %s16 17; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=vector | \18; RUN: FileCheck -check-prefixes=CHECK,CHECK-VECTOR %s19; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=+vector | \20; RUN: FileCheck -check-prefixes=CHECK,CHECK-VECTOR %s21; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=-vector,vector | \22; RUN: FileCheck -check-prefixes=CHECK,CHECK-VECTOR %s23; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=-vector,+vector | \24; RUN: FileCheck -check-prefixes=CHECK,CHECK-VECTOR %s25; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=-vector | \26; RUN: FileCheck -check-prefixes=CHECK,CHECK-NOVECTOR %s27; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=vector,-vector | \28; RUN: FileCheck -check-prefixes=CHECK,CHECK-NOVECTOR %s29; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=+vector,-vector | \30; RUN: FileCheck -check-prefixes=CHECK,CHECK-NOVECTOR %s31 32; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -mattr=-vector | \33; RUN: FileCheck -check-prefixes=CHECK,CHECK-NOVECTOR %s34 35; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -mattr=+soft-float | \36; RUN: FileCheck -check-prefixes=CHECK,CHECK-NOVECTOR %s37; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 \38; RUN: -mattr=soft-float,-soft-float | \39; RUN: FileCheck -check-prefixes=CHECK,CHECK-VECTOR %s40; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 \41; RUN: -mattr=-soft-float,soft-float | \42; RUN: FileCheck -check-prefixes=CHECK,CHECK-NOVECTOR %s43 44%struct.S_vx = type { i8, <2 x i64> }45%struct.S_novx = type { i8, [15 x i8], <2 x i64> }46 47define void @fun_vx(ptr %s) nounwind {48; CHECK-LABEL: @fun_vx49;50; CHECK-VECTOR: vl %v0, 8(%r2)51; CHECK-VECTOR: vst %v0, 8(%r2), 352;53; CHECK-NOVECTOR-DAG: agsi 16(%r2), 154; CHECK-NOVECTOR-DAG: agsi 8(%r2), 155 %ptr = getelementptr %struct.S_vx, ptr %s, i64 0, i32 156 %vec = load <2 x i64>, ptr %ptr57 %add = add <2 x i64> %vec, <i64 1, i64 1>58 store <2 x i64> %add, ptr %ptr59 ret void60}61 62define void @fun_novx(ptr %s) nounwind {63; CHECK-LABEL: @fun_novx64;65; CHECK-VECTOR: vl %v0, 16(%r2), 366; CHECK-VECTOR: vst %v0, 16(%r2), 367;68; CHECK-NOVECTOR-DAG: agsi 16(%r2), 169; CHECK-NOVECTOR-DAG: agsi 24(%r2), 170 %ptr = getelementptr %struct.S_novx, ptr %s, i64 0, i32 271 %vec = load <2 x i64>, ptr %ptr72 %add = add <2 x i64> %vec, <i64 1, i64 1>73 store <2 x i64> %add, ptr %ptr74 ret void75}76 77