[all-commits] [llvm/llvm-project] 5df62b: [mlir][spirv] Support poison index when converting...

Andrea Faulds via All-commits all-commits at lists.llvm.org
Wed Feb 5 05:27:57 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5df62bdc9be9c258c5ac45c8093b71e23777fa0e
      https://github.com/llvm/llvm-project/commit/5df62bdc9be9c258c5ac45c8093b71e23777fa0e
  Author: Andrea Faulds <andrea.faulds at amd.com>
  Date:   2025-02-05 (Wed, 05 Feb 2025)

  Changed paths:
    M mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp
    M mlir/test/Conversion/VectorToSPIRV/vector-to-spirv.mlir

  Log Message:
  -----------
  [mlir][spirv] Support poison index when converting vector.insert/extract (#125560)

This modifies the conversion patterns so that, in the case where the
index is known statically to be poison, the insertion/extraction is
replaced by an arbitrary junk constant value, and in the dynamic case,
the index is sanitized at runtime. This avoids triggering a UB in both
cases. The dynamic case is definitely a pessimisation of the generated
code, but the use of dynamic indexes is expected to be very rare and
already slow on real-world GPU compilers ingesting SPIR-V, so the impact
should be negligible.

Resolves #124162.



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