brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 8dcc211 Raw
56 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -vector-library=MASSV -force-vector-interleave=1 \3; RUN:   -vectorizer-maximize-bandwidth -passes='default<O2>,inject-tli-mappings,loop-vectorize' \4; RUN:   -mtriple=powerpc64le-unknown-linux -S -mcpu=pwr9 2>&1 | FileCheck %s5 6define dso_local double @test(ptr %Arr) {7; CHECK-LABEL: @test(8; CHECK-NEXT:  entry:9; CHECK-NEXT:    br label [[VECTOR_BODY:%.*]]10; CHECK:       vector.body:11; CHECK-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]12; CHECK-NEXT:    [[VEC_PHI:%.*]] = phi <2 x double> [ zeroinitializer, [[ENTRY]] ], [ [[TMP3:%.*]], [[VECTOR_BODY]] ]13; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds nuw float, ptr [[ARR:%.*]], i64 [[INDEX]]14; CHECK-NEXT:    [[WIDE_LOAD:%.*]] = load <2 x float>, ptr [[TMP0]], align 415; CHECK-NEXT:    [[TMP1:%.*]] = fpext <2 x float> [[WIDE_LOAD]] to <2 x double>16; CHECK-NEXT:    [[TMP2:%.*]] = tail call fast <2 x double> @__sind2(<2 x double> [[TMP1]])17; CHECK-NEXT:    [[TMP3]] = fadd fast <2 x double> [[TMP2]], [[VEC_PHI]]18; CHECK-NEXT:    [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 219; CHECK-NEXT:    [[TMP4:%.*]] = icmp eq i64 [[INDEX_NEXT]], 12820; CHECK-NEXT:    br i1 [[TMP4]], label [[FOR_END:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP0:![0-9]+]]21; CHECK:       for.end:22; CHECK-NEXT:    [[DOTLCSSA:%.*]] = phi <2 x double> [ [[TMP3]], [[VECTOR_BODY]] ]23; CHECK-NEXT:    [[TMP5:%.*]] = tail call fast double @llvm.vector.reduce.fadd.v2f64(double 0.000000e+00, <2 x double> [[DOTLCSSA]])24; CHECK-NEXT:    ret double [[TMP5]]25;26entry:27  br label %for.cond28 29for.cond:30  %Sum.0 = phi double [ 0.000000e+00, %entry ], [ %add, %for.inc ]31  %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]32  %cmp = icmp slt i32 %i.0, 12833  br i1 %cmp, label %for.body, label %for.cond.cleanup34 35for.cond.cleanup:36  br label %for.end37 38for.body:39  %idxprom = sext i32 %i.0 to i6440  %arrayidx = getelementptr inbounds float, ptr %Arr, i64 %idxprom41  %0 = load float, ptr %arrayidx, align 442  %conv = fpext float %0 to double43  %1 = call fast double @llvm.sin.f64(double %conv)44  %add = fadd fast double %Sum.0, %145  br label %for.inc46 47for.inc:48  %inc = add nsw i32 %i.0, 149  br label %for.cond50 51for.end:52  ret double %Sum.053}54 55declare double @llvm.sin.f64(double)56