[all-commits] [llvm/llvm-project] 59e5cb: [SPIR-V] Do not emit spv_ptrcast if GEP result is ...
Michal Paszkowski via All-commits
all-commits at lists.llvm.org
Mon Jan 15 19:56:22 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 59e5cb7b83fbbce2423e0c024861f83c0390670f
https://github.com/llvm/llvm-project/commit/59e5cb7b83fbbce2423e0c024861f83c0390670f
Author: Michal Paszkowski <michal at paszkowski.org>
Date: 2024-01-15 (Mon, 15 Jan 2024)
Changed paths:
M llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
M llvm/test/CodeGen/SPIRV/logical-struct-access.ll
A llvm/test/CodeGen/SPIRV/pointers/getelementptr-bitcast-load.ll
Log Message:
-----------
[SPIR-V] Do not emit spv_ptrcast if GEP result is of expected type (#78122)
Prior to this change spv_ptrcast (and OpBitcast) was never emitted for
GEP resulting pointers. While such SPIR-V was (mostly) accepted by the
NEO GPU driver, the generated SPIR-V was incorrect.
The newly added test (pointers/getelementptr-bitcast-load.ll) verifies
that a correct bitcast is added for more complex cases and passes
spirv-val. The test is based on an OpenCL CTS test (basic/prefetch).
More information about the All-commits
mailing list