[all-commits] [llvm/llvm-project] 0fbaf0: [SPIR-V] Cast ptr kernel args to i8* when used as ...

Michal Paszkowski via All-commits all-commits at lists.llvm.org
Sun Jan 28 19:30:25 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0fbaf03f703db2cb29d1bde23708b80db049164f
      https://github.com/llvm/llvm-project/commit/0fbaf03f703db2cb29d1bde23708b80db049164f
  Author: Michal Paszkowski <michal at paszkowski.org>
  Date:   2024-01-28 (Sun, 28 Jan 2024)

  Changed paths:
    M llvm/lib/Target/SPIRV/CMakeLists.txt
    M llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
    M llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
    A llvm/lib/Target/SPIRV/SPIRVMetadata.cpp
    A llvm/lib/Target/SPIRV/SPIRVMetadata.h
    A llvm/test/CodeGen/SPIRV/pointers/kernel-argument-ptr-i8-default-element-type.ll
    A llvm/test/CodeGen/SPIRV/pointers/kernel-argument-ptr-no-bitcast.ll
    A llvm/test/CodeGen/SPIRV/pointers/store-kernel-arg-i8-ptr-as-value-operand.ll
    A llvm/test/CodeGen/SPIRV/pointers/store-kernel-arg-ptr-as-value-operand.ll

  Log Message:
  -----------
  [SPIR-V] Cast ptr kernel args to i8* when used as Store's value operand (#78603)

Handle a special case when StoreInst's value operand is a kernel
argument of a pointer type. Since these arguments could have either a
basic element type (e.g. float*) or OpenCL builtin type (sampler_t),
bitcast the StoreInst's value operand to default pointer element type
(i8).

This pull request addresses the issue
https://github.com/llvm/llvm-project/issues/72864




More information about the All-commits mailing list