[all-commits] [llvm/llvm-project] 39c454: [TTI] getScalingFactorCost should return Instructi...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed Mar 5 09:11:08 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 39c454af01fd272166e5379ffc4d4d6b32d7bbee
      https://github.com/llvm/llvm-project/commit/39c454af01fd272166e5379ffc4d4d6b32d7bbee
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2025-03-05 (Wed, 05 Mar 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
    M llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
    M llvm/lib/Target/ARM/ARMTargetTransformInfo.h
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/lib/Target/X86/X86TargetTransformInfo.h

  Log Message:
  -----------
  [TTI] getScalingFactorCost should return InstructionCost::getInvalid() instead of -1. (#129802)

Historically this function return an int with negative values meaning
invalid. It was migrated to InstructionCost in 43ace8b5ce07a, but the
code was not updated to return invalid cost instead of -1. In that
commit, the caller in LSR was updated to assert that the cost is valid
instead of positive. We should return invalid instead of a negative
value so LSR will assert if the cost isn't valid.



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