1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4 2; RUN: opt -S --passes=slp-vectorizer -mtriple=riscv64-unknown-linux -pass-remarks-output=%t -mattr=+v -slp-threshold=-10 < %s | FileCheck %s 3; RUN: FileCheck %s --check-prefix=YAML < %t 4 5; YAML-LABEL: --- !Passed 6; YAML-NEXT: Pass: slp-vectorizer 7; YAML-NEXT: Name: StoresVectorized 8; YAML-NEXT: Function: test 9; 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 4 20; CHECK-NEXT: [[TMP5:%.*]] = call <2 x float> @llvm.masked.gather.v2f32.v2p0(<2 x ptr> zeroinitializer, i32 4, <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 0 22; 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> zeroinitializer 27; CHECK-NEXT: store <4 x float> [[TMP10]], ptr null, align 4 28; CHECK-NEXT: ret void 29; 30entry: 31 %0 = load float, ptr null, align 4 32 %1 = load float, ptr null, align 4 33 %2 = load float, ptr null, align 4 34 %cmp.i = fcmp ogt float %1, %0 35 %v14.0 = select i1 %cmp.i, float %1, float 0.000000e+00 36 %v0.0 = select i1 %cmp.i, float %0, float 0.000000e+00 37 %cmp4.i = fcmp ogt float 0.000000e+00, %2 38 %v19.0 = select i1 %cmp4.i, float 0.000000e+00, float 0.000000e+00 39 %v9.0 = select i1 %cmp4.i, float %2, float 0.000000e+00 40 store float %v0.0, ptr null, align 4 41 %v9idx = getelementptr i8, ptr null, i32 4 42 store float %v9.0, ptr %v9idx, align 4 43 %v14idx = getelementptr i8, ptr null, i32 8 44 store float %v14.0, ptr %v14idx, align 4 45 %v19idx = getelementptr i8, ptr null, i32 12 46 store float %v19.0, ptr %v19idx, align 4 47 ret void 48} 49