Modify DXILPrepare to emit no-op bitcasts
authorChris Bieneman <chris.bieneman@me.com>
Thu, 14 Apr 2022 18:41:57 +0000 (13:41 -0500)
committerChris Bieneman <chris.bieneman@me.com>
Mon, 9 May 2022 18:40:47 +0000 (13:40 -0500)
commitf5d054cdc12ef6c94a75c42400372ad525934bca
treea02026211b4a1bd0a0cf07e6a309dfd4ff39490a
parentd08e5d4cc66ad8d3cb9342f263c35e40c0dd6215
Modify DXILPrepare to emit no-op bitcasts

In supporting opaque pointers we need to re-materialize typed pointers
in bitcode emission. Because of how the value-enumerator pre-allocates
types and instructions we need to insert some no-op bitcasts in the
places that we'll need bitcasts for the pointer types.

Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D122269
llvm/lib/Target/DirectX/DXILPrepare.cpp
llvm/test/CodeGen/DirectX/conflicting-bitcast-insert.ll [new file with mode: 0644]
llvm/test/CodeGen/DirectX/omit-bitcast-insert.ll [new file with mode: 0644]