diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-09-19 20:59:04 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-09-19 20:59:04 +0000 |
commit | bf22298093d7069fbf3a3149d26fbcb4ad453ceb (patch) | |
tree | 7ab7f6d68f31b72e53695a790c7c64e70a68c86b /lib | |
parent | 9599f51559c692bb20092da23e3a34b2cc841e03 (diff) | |
download | external_llvm-bf22298093d7069fbf3a3149d26fbcb4ad453ceb.zip external_llvm-bf22298093d7069fbf3a3149d26fbcb4ad453ceb.tar.gz external_llvm-bf22298093d7069fbf3a3149d26fbcb4ad453ceb.tar.bz2 |
InstCombine: Don't allow turning vector-of-pointer loads into vector-of-integer.
The code below can't handle any pointers. PR17293.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191036 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index 88e16e9..0a0727e 100644 --- a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/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)) { |