[Libclc-dev] [PATCH 6/9] Add optimized generic addrspace(0) vload implementation
Matt Arsenault
Matthew.Arsenault at amd.com
Wed Jul 23 12:12:58 PDT 2014
On 07/22/2014 06:46 PM, Aaron Watry wrote:
> +define <2 x i32> @__clc_vload2_i32__addr0(i32 addrspace(0)* nocapture %addr) nounwind readonly alwaysinline {
> + %1 = bitcast i32 addrspace(0)* %addr to <2 x i32> addrspace(0)*
> + %2 = load <2 x i32> addrspace(0)* %1, align 4, !tbaa !3
> + ret <2 x i32> %2
> +}
Why include the addrspace(0)s? I'm also wondering why it's necessary to
write these in IR? Does casting the pointer type in C not do the right
thing?
More information about the Libclc-dev
mailing list