[PATCH] D147114: [LV] Use BFI to adjust cost of predicated instructions

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 28 23:17:53 PDT 2023


ebrevnov created this revision.
Herald added subscribers: ormris, dmgreen, arphaman, steven_wu, hiraditya.
Herald added a project: All.
ebrevnov requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.

Currently, vectorizer uses hard coded scale (1/2) to adjust cost of predicated instructions. Since actual probability of predicated instruction execution may vary from 0 to 1 predicted cost may be very far from reality. This patch brings BFI to cost calculation of predicated instructions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147114

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Analysis/CostModel/X86/masked-interleaved-store-i16.ll
  llvm/test/Analysis/CostModel/X86/masked-scatter-i32-with-i8-index.ll
  llvm/test/Analysis/CostModel/X86/masked-scatter-i64-with-i8-index.ll
  llvm/test/Other/new-pm-defaults.ll
  llvm/test/Other/new-pm-lto-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-defaults.ll
  llvm/test/Transforms/LoopVectorize/ARM/mve-icmpcost.ll
  llvm/test/Transforms/LoopVectorize/icmp-uniforms.ll
  llvm/test/Transforms/LoopVectorize/if-pred-non-void.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147114.509220.patch
Type: text/x-patch
Size: 34473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230329/df4aefa8/attachment.bin>


More information about the llvm-commits mailing list