[all-commits] [llvm/llvm-project] 672733: [VectorCombine][TTI] Prevent extract/ins rewrite t...

Nathan Gauër via All-commits all-commits at lists.llvm.org
Thu Jul 31 05:14:21 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 67273393b11954146471ab6b637adf710ef81fda
      https://github.com/llvm/llvm-project/commit/67273393b11954146471ab6b637adf710ef81fda
  Author: Nathan Gauër <brioche at google.com>
  Date:   2025-07-31 (Thu, 31 Jul 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Target/SPIRV/SPIRVTargetTransformInfo.h
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    A llvm/test/Transforms/VectorCombine/SPIRV/lit.local.cfg
    A llvm/test/Transforms/VectorCombine/SPIRV/load-insert-store.ll

  Log Message:
  -----------
  [VectorCombine][TTI] Prevent extract/ins rewrite to GEP (#150216)

Using GEP to index into a vector is not disallowed, but not recommended.
The SPIR-V backend needs to generate structured access into types, which
is impossible with an untyped GEP instruction unless we add more info to
the IR. Finding a solution is a work-in-progress, but in the meantime,
we'd like to reduce the amount of failures.

Preventing this optimizations from rewritting extract/insert
instructions into a GEP helps us lower more code to SPIR-V. This change
should be OK as it's only active when targeting SPIR-V and disabling a
non-recommended transformation.

Related to #145002



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