[PATCH 70/79] [Backport to 15][OpaquePointers] Handle llvm.memset intrinsic mangling mismatches. (#2183)
Original change:
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/
bdd765263a0a7184dbd18fe5396313802f731e25
Non-constant @llvm.memset calls are presently lowered by generating synthetic
functions with the mangled name of memset. However, the reader tries to use this
name to generate the intrinsic call again. This causes verification issues if
the SPIRVWriter and SPIRVReader do not agree on whether or not to use opaque
pointers. This change uses the actual type of the function (which will take into
account whether or not it is in opaque pointer mode) to generate the LLVM
intrinsic name, fixing the mismatch issues.
Co-authored-by: Joshua Cranmer <joshua.cranmer@intel.com>
Gbp-Pq: Name 0070-Backport-to-15-OpaquePointers-Handle-llvm.memset-int.patch