AlexeySotkin added a comment. In https://reviews.llvm.org/D46015#1078235, @stuart wrote:
> 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) > Sorry, but I don't quite understand what does `get_pipe_max_packets()`, **uses** `__get_pipe_num_packets()` mean. Could you clarify? Possibly OpenCL C source example could help. Thanks https://reviews.llvm.org/D46015 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits