brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.6 KiB · 81b8507 Raw
76 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -passes='lower-matrix-intrinsics' -S < %s | FileCheck %s3 4define void @strided_store_3x2(<6 x double> %in, ptr %out) {5; CHECK-LABEL: @strided_store_3x2(6; CHECK-NEXT:    [[SPLIT:%.*]] = shufflevector <6 x double> [[IN:%.*]], <6 x double> poison, <3 x i32> <i32 0, i32 1, i32 2>7; CHECK-NEXT:    [[SPLIT1:%.*]] = shufflevector <6 x double> [[IN]], <6 x double> poison, <3 x i32> <i32 3, i32 4, i32 5>8; CHECK-NEXT:    store <3 x double> [[SPLIT]], ptr [[OUT:%.*]], align 89; CHECK-NEXT:    [[VEC_GEP:%.*]] = getelementptr double, ptr [[OUT]], i64 510; CHECK-NEXT:    store <3 x double> [[SPLIT1]], ptr [[VEC_GEP]], align 811; CHECK-NEXT:    ret void12;13  call void @llvm.matrix.column.major.store.v6f64.i64(<6 x double> %in, ptr %out, i64 5, i1 false, i32 3, i32 2)14  ret void15}16 17define void @strided_store_3x2_nonconst_stride(<6 x double> %in, i64 %stride, ptr %out) {18; CHECK-LABEL: @strided_store_3x2_nonconst_stride(19; CHECK-NEXT:    [[SPLIT:%.*]] = shufflevector <6 x double> [[IN:%.*]], <6 x double> poison, <3 x i32> <i32 0, i32 1, i32 2>20; CHECK-NEXT:    [[SPLIT1:%.*]] = shufflevector <6 x double> [[IN]], <6 x double> poison, <3 x i32> <i32 3, i32 4, i32 5>21; CHECK-NEXT:    [[VEC_START:%.*]] = mul i64 0, [[STRIDE:%.*]]22; CHECK-NEXT:    [[VEC_GEP:%.*]] = getelementptr double, ptr [[OUT:%.*]], i64 [[VEC_START]]23; CHECK-NEXT:    store <3 x double> [[SPLIT]], ptr [[VEC_GEP]], align 824; CHECK-NEXT:    [[VEC_START2:%.*]] = mul i64 1, [[STRIDE]]25; CHECK-NEXT:    [[VEC_GEP3:%.*]] = getelementptr double, ptr [[OUT]], i64 [[VEC_START2]]26; CHECK-NEXT:    store <3 x double> [[SPLIT1]], ptr [[VEC_GEP3]], align 827; CHECK-NEXT:    ret void28;29  call void @llvm.matrix.column.major.store.v6f64.i64(<6 x double> %in, ptr %out, i64 %stride, i1 false, i32 3, i32 2)30  ret void31}32 33define void @strided_store_3x2_nonconst_i32_stride(<6 x double> %in, i32 %stride, ptr %out) {34; CHECK-LABEL: @strided_store_3x2_nonconst_i32_stride(35; CHECK-NEXT:    [[SPLIT:%.*]] = shufflevector <6 x double> [[IN:%.*]], <6 x double> poison, <3 x i32> <i32 0, i32 1, i32 2>36; CHECK-NEXT:    [[SPLIT1:%.*]] = shufflevector <6 x double> [[IN]], <6 x double> poison, <3 x i32> <i32 3, i32 4, i32 5>37; CHECK-NEXT:    [[STRIDE_CAST:%.*]] = zext i32 [[STRIDE:%.*]] to i6438; CHECK-NEXT:    [[VEC_START:%.*]] = mul i64 0, [[STRIDE_CAST]]39; CHECK-NEXT:    [[VEC_GEP:%.*]] = getelementptr double, ptr [[OUT:%.*]], i64 [[VEC_START]]40; CHECK-NEXT:    store <3 x double> [[SPLIT]], ptr [[VEC_GEP]], align 841; CHECK-NEXT:    [[VEC_START2:%.*]] = mul i64 1, [[STRIDE_CAST]]42; CHECK-NEXT:    [[VEC_GEP3:%.*]] = getelementptr double, ptr [[OUT]], i64 [[VEC_START2]]43; CHECK-NEXT:    store <3 x double> [[SPLIT1]], ptr [[VEC_GEP3]], align 844; CHECK-NEXT:    ret void45;46  call void @llvm.matrix.column.major.store.v6f64.i32(<6 x double> %in, ptr %out, i32 %stride, i1 false, i32 3, i32 2)47  ret void48}49 50define void @strided_store_2x3(<10 x double> %in, ptr %out) {51; CHECK-LABEL: @strided_store_2x3(52; CHECK-NEXT:    [[SPLIT:%.*]] = shufflevector <10 x double> [[IN:%.*]], <10 x double> poison, <2 x i32> <i32 0, i32 1>53; CHECK-NEXT:    [[SPLIT1:%.*]] = shufflevector <10 x double> [[IN]], <10 x double> poison, <2 x i32> <i32 2, i32 3>54; CHECK-NEXT:    [[SPLIT2:%.*]] = shufflevector <10 x double> [[IN]], <10 x double> poison, <2 x i32> <i32 4, i32 5>55; CHECK-NEXT:    [[SPLIT3:%.*]] = shufflevector <10 x double> [[IN]], <10 x double> poison, <2 x i32> <i32 6, i32 7>56; CHECK-NEXT:    [[SPLIT4:%.*]] = shufflevector <10 x double> [[IN]], <10 x double> poison, <2 x i32> <i32 8, i32 9>57; CHECK-NEXT:    store <2 x double> [[SPLIT]], ptr [[OUT:%.*]], align 858; CHECK-NEXT:    [[VEC_GEP:%.*]] = getelementptr double, ptr [[OUT]], i64 459; CHECK-NEXT:    store <2 x double> [[SPLIT1]], ptr [[VEC_GEP]], align 860; CHECK-NEXT:    [[VEC_GEP5:%.*]] = getelementptr double, ptr [[OUT]], i64 861; CHECK-NEXT:    store <2 x double> [[SPLIT2]], ptr [[VEC_GEP5]], align 862; CHECK-NEXT:    [[VEC_GEP6:%.*]] = getelementptr double, ptr [[OUT]], i64 1263; CHECK-NEXT:    store <2 x double> [[SPLIT3]], ptr [[VEC_GEP6]], align 864; CHECK-NEXT:    [[VEC_GEP7:%.*]] = getelementptr double, ptr [[OUT]], i64 1665; CHECK-NEXT:    store <2 x double> [[SPLIT4]], ptr [[VEC_GEP7]], align 866; CHECK-NEXT:    ret void67;68  call void @llvm.matrix.column.major.store.v10f64.i64(<10 x double> %in, ptr %out, i64 4, i1 false, i32 2, i32 5)69  ret void70}71 72declare void @llvm.matrix.column.major.store.v6f64.i64(<6 x double>, ptr, i64, i1, i32, i32)73declare void @llvm.matrix.column.major.store.v6f64.i32(<6 x double>, ptr, i32, i1, i32, i32)74declare void @llvm.matrix.column.major.store.v10f64.i64(<10 x double>, ptr, i64, i1, i32, i32)75 76