[all-commits] [llvm/llvm-project] 50afaf: [RISCV][TTI] Adjust constant materialization cost ...

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Sep 27 10:54:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 50afafbf299385c4836cca5383e9cd7eb7593c9a
      https://github.com/llvm/llvm-project/commit/50afafbf299385c4836cca5383e9cd7eb7593c9a
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2024-09-27 (Fri, 27 Sep 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/RISCV/cast.ll
    M llvm/test/Analysis/CostModel/RISCV/cttz_elts.ll

  Log Message:
  -----------
  [RISCV][TTI] Adjust constant materialization cost for (z/s)ext from i1 (#110282)

When we're lowering to a split sequence, we only need one
materialization of the zero constant. Our codegen looks something like
this:

  vmv.v.i	v24, 0
  vmerge.vim	v8, v24, -1, v0
  vmv1r.v	v0, v16
  vmerge.vim	v16, v24, -1, v0

Note: Doing this specific case since it was pointed out in
https://github.com/llvm/llvm-project/pull/110164#discussion_r1778268391,
but it's worth noting that we have the same basic problem (over costing
split operations with split invariant terms) at multiple places through
this file.



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