[all-commits] [llvm/llvm-project] b52fa9: [Analysis] Add cost model for experimental.cttz.el...

David Sherwood via All-commits all-commits at lists.llvm.org
Thu May 9 01:40:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b52fa9461ab73eaf2d04f32c806a1715b2595830
      https://github.com/llvm/llvm-project/commit/b52fa9461ab73eaf2d04f32c806a1715b2595830
  Author: David Sherwood <57997763+david-arm at users.noreply.github.com>
  Date:   2024-05-09 (Thu, 09 May 2024)

  Changed paths:
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/include/llvm/CodeGen/TargetLowering.h
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/CodeGen/TargetLoweringBase.cpp
    A llvm/test/Analysis/CostModel/AArch64/cttz_elts.ll
    A llvm/test/Analysis/CostModel/RISCV/cttz_elts.ll

  Log Message:
  -----------
  [Analysis] Add cost model for experimental.cttz.elts intrinsic (#90720)

In PR #88385 I've added support for auto-vectorisation of some early
exit loops, which requires using the experimental.cttz.elts to calculate
final indices in the early exit block. We need a more accurate cost
model for this intrinsic to better reflect the cost of work required in
the early exit block. I've tried to accurately represent the expansion
code for the intrinsic when the target does not have efficient lowering
for it. It's quite tricky to model because you need to first figure out
what types will actually be used in the expansion. The type used can
have a significant effect on the cost if you end up using illegal vector
types.

Tests added here:

  Analysis/CostModel/AArch64/cttz_elts.ll
  Analysis/CostModel/RISCV/cttz_elts.ll



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list