[PATCH] D26803: Fix known zero bits for addrspacecast

Yaxun Liu via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 11:14:14 PST 2016


yaxunl marked an inline comment as done.
yaxunl added inline comments.


================
Comment at: lib/Analysis/ValueTracking.cpp:1028-1029
   case Instruction::IntToPtr:
   case Instruction::AddrSpaceCast: // Pointers could be different sizes.
     // Fall through and handle them the same as zext/trunc.
     LLVM_FALLTHROUGH;
----------------
arsenm wrote:
> yaxunl wrote:
> > arsenm wrote:
> > > AddrSpaceCast should probably just be removed from the switch
> > Some optimizations will be lost if it is removed.
> Those optimizations are also broken
But you are right. We cannot assume anything about the bits after addrspacecast.


https://reviews.llvm.org/D26803





More information about the llvm-commits mailing list