[PATCH] D86452: [LV] Fix scalar cost for tail predicated loops

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 06:13:17 PDT 2020


fhahn added a comment.

Can you add the test separately and then just have the diff of the cost-model change in this patch?



================
Comment at: llvm/test/Transforms/LoopVectorize/ARM/scalar-block-cost.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -loop-vectorize -debug-only=loop-vectorize -enable-arm-maskedgatscat -tail-predication=force-enabled -disable-output < %s 2>&1 | FileCheck %s --check-prefixes=CHECK-COST,CHECK-COST-2
----------------
Are the lines actually auto-generated? Looks like they are just a subset of the debug output?


================
Comment at: llvm/test/Transforms/LoopVectorize/ARM/scalar-block-cost.ll:8
+
+define dso_local void @pred_loop(i32* noalias nocapture readnone %off, i32* noalias nocapture readonly %data, i32* noalias nocapture %dst, i32 %n) local_unnamed_addr #0 {
+
----------------
nit: are `dse_local`, `no capture`, `read none` `local_unnamed_addr` actually needed?


================
Comment at: llvm/test/Transforms/LoopVectorize/ARM/scalar-block-cost.ll:103
+
+attributes #0 = { nofree norecurse nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="true" "no-jump-tables"="false" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+armv8.1-m.main,+dsp,+fp-armv8d16sp,+fp16,+fullfp16,+hwdiv,+lob,+mve,+mve.fp,+ras,+strict-align,+thumb-mode,+vfp2sp,+vfp3d16sp,+vfp4d16sp" "unsafe-fp-math"="true" "use-soft-float"="false" }
----------------
are all those attributes needed? can you limit them to the minimum required?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86452/new/

https://reviews.llvm.org/D86452



More information about the llvm-commits mailing list