Hi pekka,

  I think the assertion you reported is related to the introduction of the 
'addrspacecast' instruction: now the bitcast is illegal when you want to 
convert a pointer between different address space, you have to use 
addrspacecast instead.

  This patch do not prevent *explicit casts* between address space: for OpenCL 
this should be a semantic check that must be catched before code generation. 
The current patch just fix the codegen. As you suggest for OpenCL in those 
cases where pointer cast between address spaces is effectively just a 
reinterpretation a good solution is to use union.

  I agree with you that this patch should be pushed also on 3.4 branch. I do 
not know how to manage this. BTW, I have not commit rights so I would need 
someone that can commit the patch for me.

http://llvm-reviews.chandlerc.com/D2241
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to