[PATCH] Add CreatePointerBitCastOrAddrSpaceCast to IRBuilder and co.
Matthew.Arsenault at amd.com
Thu Mar 6 13:51:27 PST 2014
The reasoning is that it is more restrictive than CreatePointerCast. CreatePointerCast will create a bitcast or addrspacecast depending on the source and destination address spaces. I've found that 90+% of the time, creating an addrspacecast is a bug from not using the correct address space for one of the operands. This makes it explicit that a different address space is OK in the relatively rare places where it is expected.
More information about the llvm-commits