49 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 42; RUN: opt -S --passes=slp-vectorizer -mtriple=riscv64-unknown-linux -pass-remarks-output=%t -mattr=+v -slp-threshold=-10 < %s | FileCheck %s3; RUN: FileCheck %s --check-prefix=YAML < %t4 5; YAML-LABEL: --- !Passed6; YAML-NEXT: Pass: slp-vectorizer7; YAML-NEXT: Name: StoresVectorized8; YAML-NEXT: Function: test9; YAML-NEXT: Args:10; YAML-NEXT: - String: 'Stores SLP vectorized with cost '11; YAML-NEXT: - Cost: '-2'12; YAML-NEXT: - String: ' and with tree size '13; YAML-NEXT: - TreeSize: '9'14 15define void @test() {16; CHECK-LABEL: define void @test(17; CHECK-SAME: ) #[[ATTR0:[0-9]+]] {18; CHECK-NEXT: entry:19; CHECK-NEXT: [[TMP2:%.*]] = load float, ptr null, align 420; CHECK-NEXT: [[TMP5:%.*]] = call <2 x float> @llvm.masked.gather.v2f32.v2p0(<2 x ptr> align 4 zeroinitializer, <2 x i1> splat (i1 true), <2 x float> poison)21; CHECK-NEXT: [[TMP3:%.*]] = insertelement <2 x float> <float poison, float 0.000000e+00>, float [[TMP2]], i32 022; CHECK-NEXT: [[TMP6:%.*]] = fcmp ogt <2 x float> [[TMP3]], [[TMP5]]23; CHECK-NEXT: [[TMP7:%.*]] = shufflevector <2 x i1> [[TMP6]], <2 x i1> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>24; CHECK-NEXT: [[TMP8:%.*]] = shufflevector <2 x float> [[TMP5]], <2 x float> [[TMP3]], <4 x i32> <i32 0, i32 1, i32 2, i32 poison>25; CHECK-NEXT: [[TMP9:%.*]] = shufflevector <4 x float> [[TMP8]], <4 x float> <float poison, float poison, float poison, float 0.000000e+00>, <4 x i32> <i32 0, i32 1, i32 2, i32 7>26; CHECK-NEXT: [[TMP10:%.*]] = select <4 x i1> [[TMP7]], <4 x float> [[TMP9]], <4 x float> zeroinitializer27; CHECK-NEXT: store <4 x float> [[TMP10]], ptr null, align 428; CHECK-NEXT: ret void29;30entry:31 %0 = load float, ptr null, align 432 %1 = load float, ptr null, align 433 %2 = load float, ptr null, align 434 %cmp.i = fcmp ogt float %1, %035 %v14.0 = select i1 %cmp.i, float %1, float 0.000000e+0036 %v0.0 = select i1 %cmp.i, float %0, float 0.000000e+0037 %cmp4.i = fcmp ogt float 0.000000e+00, %238 %v19.0 = select i1 %cmp4.i, float 0.000000e+00, float 0.000000e+0039 %v9.0 = select i1 %cmp4.i, float %2, float 0.000000e+0040 store float %v0.0, ptr null, align 441 %v9idx = getelementptr i8, ptr null, i32 442 store float %v9.0, ptr %v9idx, align 443 %v14idx = getelementptr i8, ptr null, i32 844 store float %v14.0, ptr %v14idx, align 445 %v19idx = getelementptr i8, ptr null, i32 1246 store float %v19.0, ptr %v19idx, align 447 ret void48}49