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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to