brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · 3a01c51 Raw
46 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; RUN: opt -p lower-matrix-intrinsics -S %s | FileCheck %s3 4define void @redundant_transpose_of_shuffle(<4 x float> %m, ptr %dst) {5; CHECK-LABEL: define void @redundant_transpose_of_shuffle(6; CHECK-SAME: <4 x float> [[M:%.*]], ptr [[DST:%.*]]) {7; CHECK-NEXT:  [[ENTRY:.*:]]8; CHECK-NEXT:    [[SHUFFLE:%.*]] = shufflevector <4 x float> [[M]], <4 x float> zeroinitializer, <4 x i32> zeroinitializer9; CHECK-NEXT:    [[SPLIT:%.*]] = shufflevector <4 x float> [[SHUFFLE]], <4 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>10; CHECK-NEXT:    store <4 x float> [[SPLIT]], ptr [[DST]], align 411; CHECK-NEXT:    ret void12;13entry:14  %shuffle = shufflevector <4 x float> %m, <4 x float> zeroinitializer, <4 x i32> zeroinitializer15  %t = tail call <4 x float> @llvm.matrix.transpose.v3f32(<4 x float> %shuffle, i32 1, i32 4)16  store <4 x float> %t, ptr %dst, align 417  ret void18}19 20define void @redundant_transpose_of_shuffle_2(<4 x float> %m, ptr %dst) {21; CHECK-LABEL: define void @redundant_transpose_of_shuffle_2(22; CHECK-SAME: <4 x float> [[M:%.*]], ptr [[DST:%.*]]) {23; CHECK-NEXT:  [[ENTRY:.*:]]24; CHECK-NEXT:    [[SHUFFLE:%.*]] = shufflevector <4 x float> [[M]], <4 x float> zeroinitializer, <4 x i32> zeroinitializer25; CHECK-NEXT:    [[SPLIT:%.*]] = shufflevector <4 x float> [[SHUFFLE]], <4 x float> poison, <1 x i32> zeroinitializer26; CHECK-NEXT:    [[SPLIT1:%.*]] = shufflevector <4 x float> [[SHUFFLE]], <4 x float> poison, <1 x i32> <i32 1>27; CHECK-NEXT:    [[SPLIT2:%.*]] = shufflevector <4 x float> [[SHUFFLE]], <4 x float> poison, <1 x i32> <i32 2>28; CHECK-NEXT:    [[SPLIT3:%.*]] = shufflevector <4 x float> [[SHUFFLE]], <4 x float> poison, <1 x i32> <i32 3>29; CHECK-NEXT:    store <1 x float> [[SPLIT]], ptr [[DST]], align 430; CHECK-NEXT:    [[VEC_GEP:%.*]] = getelementptr float, ptr [[DST]], i64 131; CHECK-NEXT:    store <1 x float> [[SPLIT1]], ptr [[VEC_GEP]], align 432; CHECK-NEXT:    [[VEC_GEP4:%.*]] = getelementptr float, ptr [[DST]], i64 233; CHECK-NEXT:    store <1 x float> [[SPLIT2]], ptr [[VEC_GEP4]], align 434; CHECK-NEXT:    [[VEC_GEP5:%.*]] = getelementptr float, ptr [[DST]], i64 335; CHECK-NEXT:    store <1 x float> [[SPLIT3]], ptr [[VEC_GEP5]], align 436; CHECK-NEXT:    ret void37;38entry:39  %shuffle = shufflevector <4 x float> %m, <4 x float> zeroinitializer, <4 x i32> zeroinitializer40  %t = tail call <4 x float> @llvm.matrix.transpose.v3f32(<4 x float> %shuffle, i32 4, i32 1)41  store <4 x float> %t, ptr %dst, align 442  ret void43}44 45declare <4 x float> @llvm.matrix.transpose.v3f32(<4 x float>, i32, i32)46