xroche wrote: > Are the checks for isCUDADeviceBuiltinSurfaceType() needed in the latest > version? Copying arguments should get routed through EmitAggregateCopy, I > think.
Yes, still needed. EmitAggregateCopy only runs for arguments passed indirectly (through memory). On the device side, surface/texture arguments are passed directly as an i64 handle, and for direct arguments EmitCall loads the bytes straight from the forwarded address. The handle conversion lives in EmitAggregateCopy and normally runs when the argument temporary is built, so skipping the temporary skips the conversion. I verified at the current head: with the checks removed, the musttail caller in CodeGenCUDA/surface.cu loads a raw i64 from @surf instead of calling llvm.nvvm.texsurf.handle.internal. The musttail CHECK lines in that test catch this. https://github.com/llvm/llvm-project/pull/199351 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
