[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types
Stuart Brady via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 25 08:31:21 PDT 2018
stuart added a comment.
In https://reviews.llvm.org/D46015#1078217, @AlexeySotkin wrote:
> There should not be need for bitcast. Could give an example ? Thanks.
If I have a `write_only` pipe as the argument to `get_pipe_max_packets()`, and this uses a single `__get_pipe_num_packets()` function taking a `read_only` pipe, we will automatically get a bitcast:
%20 = call i32 bitcast (i32 (%opencl.pipe_ro_t*, i32, i32)* @__get_pipe_max_packets to i32 (%opencl.pipe_wo_t*, i32, i32)*)(%opencl.pipe_wo_t* %19, i32 4, i32 4)
https://reviews.llvm.org/D46015
More information about the cfe-commits
mailing list