[llvm-commits] [llvm] r111568 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp test/Transforms/InstCombine/2010-08-19-StoreNarrowing.ll
Duncan Sands
baldrick at free.fr
Fri Aug 27 18:24:54 PDT 2010
Hi Owen,
> + // If we can find a power-of-2 prefix (and if the values we're working with
> + // are themselves POT widths), then we can narrow the store. We rely on
> + // later iterations of instcombine to propagate the demanded bits to narrow
> + // the other computations in the chain.
> + if (NewWidth< AndMask.getBitWidth()&&
> + isPowerOf2_64(AndMask.getBitWidth())) {
> + const Type *NewType = IntegerType::get(Ptr->getContext(), NewWidth);
is it possible that you do an i4 store here? That would actually overwrite 8
bits, which would be wrong.
Ciao,
Duncan.
More information about the llvm-commits
mailing list