[all-commits] [llvm/llvm-project] 97f607: [VectorCombine][X86] Use updated getVectorInstrCos...

Luke Lau via All-commits all-commits at lists.llvm.org
Tue May 27 08:27:55 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 97f6076dedc6ba78ccdb36f53a6953a66abfd395
      https://github.com/llvm/llvm-project/commit/97f6076dedc6ba78ccdb36f53a6953a66abfd395
  Author: Luke Lau <luke at igalia.com>
  Date:   2025-05-27 (Tue, 27 May 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    A llvm/test/Transforms/VectorCombine/RISCV/binop-scalarize.ll
    M llvm/test/Transforms/VectorCombine/X86/insert-binop-with-constant-inseltpoison.ll
    M llvm/test/Transforms/VectorCombine/X86/insert-binop-with-constant.ll
    M llvm/test/Transforms/VectorCombine/X86/insert-binop.ll
    M llvm/test/Transforms/VectorCombine/X86/scalarize-cmp-inseltpoison.ll
    M llvm/test/Transforms/VectorCombine/X86/scalarize-cmp.ll

  Log Message:
  -----------
  [VectorCombine][X86] Use updated getVectorInstrCost hook (#137823)

This addresses a TODO where previously scalarizeBinopOrCmp
conservatively bailed if one of the operands was a load.

getVectorInstrCost was updated to take in values in
https://reviews.llvm.org/D140498 so we can pass in the scalar value to
be inserted, which should return an accurate cost for a gather.

To prevent regressions on x86 this tries to constant fold NewVecC up
front so we can pass it into TTI and get a more accurate cost.

We want to remove this restriction on RISC-V since this is always
profitable whether or not the scalar is a load.



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