89 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S -passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s3 4define void @b() {5; CHECK-LABEL: @b(6; CHECK-NEXT: entry:7; CHECK-NEXT: [[TMP0:%.*]] = insertelement <4 x float> poison, float 0x7FF8000000000000, i32 08; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x float> [[TMP0]], <4 x float> <float 0xFFF8000000000000, float 0xFFF8000000000000, float undef, float undef>, <4 x i32> <i32 0, i32 4, i32 5, i32 poison>9; CHECK-NEXT: [[TMP2:%.*]] = insertelement <4 x float> [[TMP1]], float 0x7FF8000000000000, i32 310; CHECK-NEXT: [[TMP3:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[TMP2]], <4 x float> zeroinitializer, <4 x float> zeroinitializer)11; CHECK-NEXT: [[TMP4:%.*]] = fmul <4 x float> [[TMP3]], <float undef, float undef, float undef, float 2.000000e+00>12; CHECK-NEXT: [[TMP5:%.*]] = fdiv <4 x float> [[TMP4]], zeroinitializer13; CHECK-NEXT: store <4 x float> [[TMP5]], ptr undef, align 414; CHECK-NEXT: ret void15;16entry:17 %mul = fmul float undef, 2.000000e+0018 %i = tail call float @llvm.fmuladd.f32(float %mul, float 0.000000e+00, float 0.000000e+00)19 %mul2 = fmul float undef, %i20 %add = fadd float undef, 1.000000e+0021 %neg = fneg float %add22 %i1 = tail call float @llvm.fmuladd.f32(float %neg, float 0.000000e+00, float 0.000000e+00)23 %mul4 = fmul float undef, %i124 %neg7 = fneg float %mul25 %i2 = tail call float @llvm.fmuladd.f32(float %neg7, float 0.000000e+00, float 0.000000e+00)26 %mul8 = fmul float undef, %i227 %i3 = tail call float @llvm.fmuladd.f32(float %add, float 0.000000e+00, float 0.000000e+00)28 %mul11 = fmul float %i3, 2.000000e+0029 %div = fdiv float %mul2, 0.000000e+0030 store float %div, ptr undef, align 431 %div12 = fdiv float %mul4, 0.000000e+0032 %arrayidx13 = getelementptr inbounds float, ptr undef, i64 133 store float %div12, ptr %arrayidx13, align 434 %div14 = fdiv float %mul8, 0.000000e+0035 %arrayidx15 = getelementptr inbounds float, ptr undef, i64 236 store float %div14, ptr %arrayidx15, align 437 %div16 = fdiv float %mul11, 0.000000e+0038 %arrayidx17 = getelementptr inbounds float, ptr undef, i64 339 store float %div16, ptr %arrayidx17, align 440 ret void41}42 43declare float @llvm.fmuladd.f32(float, float, float)44 45define void @test(float %a) {46; CHECK-LABEL: @test(47; CHECK-NEXT: entry:48; CHECK-NEXT: [[TMP0:%.*]] = insertelement <2 x float> poison, float [[A:%.*]], i32 049; CHECK-NEXT: [[SHUFFLE:%.*]] = shufflevector <2 x float> [[TMP0]], <2 x float> poison, <2 x i32> zeroinitializer50; CHECK-NEXT: br label [[LOOP:%.*]]51; CHECK: loop:52; CHECK-NEXT: [[TMP1:%.*]] = fadd <2 x float> zeroinitializer, [[SHUFFLE]]53; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <2 x float> [[TMP1]], <2 x float> poison, <2 x i32> zeroinitializer54; CHECK-NEXT: br label [[LOOP]]55;56entry:57 br label %loop58 59loop:60 %add.i157 = fadd float 0.000000e+00, %a61 %add23.i = fadd float 0.000000e+00, %a62 %insert = insertelement <2 x float> zeroinitializer, float %add.i157, i64 063 %insert.i = insertelement <2 x float> %insert, float %add23.i, i64 164 %agg = insertelement <2 x float> %insert.i, float %add.i157, i64 165 br label %loop66}67 68define internal void @test1() {69; CHECK-LABEL: @test1(70; CHECK-NEXT: entry:71; CHECK-NEXT: br label [[LOOP:%.*]]72; CHECK: loop:73; CHECK-NEXT: [[DOTSROA_025_4_VEC_INSERT_US_I:%.*]] = insertelement <2 x float> zeroinitializer, float 0.000000e+00, i64 074; CHECK-NEXT: br label [[LOOP]]75;76entry:77 br label %loop78 79loop:80 %0 = fadd float 0.000000e+00, 0.000000e+0081 %1 = fadd float 0.000000e+00, 0.000000e+0082 %2 = fadd float %0, 0.000000e+0083 %3 = fadd float %1, 0.000000e+0084 %.sroa.3.8.vec.insert.i.us.i = insertelement <2 x float> zeroinitializer, float %2, i64 085 %.sroa.3.12.vec.insert.i.us.i = insertelement <2 x float> %.sroa.3.8.vec.insert.i.us.i, float %3, i64 186 %.sroa.025.4.vec.insert.us.i = insertelement <2 x float> %.sroa.3.12.vec.insert.i.us.i, float %0, i64 087 br label %loop88}89