[llvm-commits] [llvm] r166726 - in /llvm/trunk: lib/Analysis/ValueTracking.cpp test/Transforms/InstCombine/2012-10-25-vector-of-pointers.ll
Duncan Sands
baldrick at free.fr
Fri Oct 26 01:09:02 PDT 2012
Hi Nadav,
> Fix a crash in ValueTracking. Add support for vectors of pointers.
> --- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
> +++ llvm/trunk/lib/Analysis/ValueTracking.cpp Thu Oct 25 16:52:52 2012
> @@ -437,8 +437,9 @@
> if (SrcTy->isPointerTy())
> SrcBitWidth = TD->getTypeSizeInBits(SrcTy);
> else
> - SrcBitWidth = SrcTy->getScalarSizeInBits();
> -
> + SrcBitWidth = TD->getTypeSizeInBits(SrcTy->getScalarType());
> +
This whole "if" statement can just become:
SrcBitWidth = TD->getTypeSizeInBits(SrcTy->getScalarType());
as the else part can handle the other case.
Ciao, Duncan.
More information about the llvm-commits
mailing list