From 0b37cdf9af79c461faabceb7d8df3765ee7233fc Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 19 Sep 2013 20:59:04 +0000 Subject: InstCombine: Don't allow turning vector-of-pointer loads into vector-of-integer. The code below can't handle any pointers. PR17293. llvm-svn: 191036 --- llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/InstCombine') diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index 88e16e97250..0a0727e0fa3 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp @@ -318,7 +318,8 @@ static Instruction *InstCombineLoadCast(InstCombiner &IC, LoadInst &LI, SrcPTy->isVectorTy()) && // Do not allow turning this into a load of an integer, which is then // casted to a pointer, this pessimizes pointer analysis a lot. - (SrcPTy->isPointerTy() == LI.getType()->isPointerTy()) && + (SrcPTy->isPtrOrPtrVectorTy() == + LI.getType()->isPtrOrPtrVectorTy()) && IC.getDataLayout()->getTypeSizeInBits(SrcPTy) == IC.getDataLayout()->getTypeSizeInBits(DestPTy)) { -- cgit v1.2.3