aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/InstCombine/InstructionCombining.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-01-05 21:05:54 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-01-05 21:05:54 +0000
commitf0e83d2fd7d71ba3f18fffdb36cf9b70dc1f8490 (patch)
tree8fbef7d34f7ad7c92c4448013b6f60282eb53d14 /lib/Transforms/InstCombine/InstructionCombining.cpp
parentfbb3f04693e810a2bb3be1422630eaf7022d7655 (diff)
downloadexternal_llvm-f0e83d2fd7d71ba3f18fffdb36cf9b70dc1f8490.zip
external_llvm-f0e83d2fd7d71ba3f18fffdb36cf9b70dc1f8490.tar.gz
external_llvm-f0e83d2fd7d71ba3f18fffdb36cf9b70dc1f8490.tar.bz2
Move remaining stuff to the isInteger predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstructionCombining.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp
index 6064cc5..6023185 100644
--- a/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -596,8 +596,7 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
// (where tmp = 8*tmp2) into:
// getelementptr [100 x double]* %arr, i32 0, i32 %tmp2; bitcast
- if (TD && isa<ArrayType>(SrcElTy) &&
- ResElTy == Type::getInt8Ty(GEP.getContext())) {
+ if (TD && isa<ArrayType>(SrcElTy) && ResElTy->isInteger(8)) {
uint64_t ArrayEltSize =
TD->getTypeAllocSize(cast<ArrayType>(SrcElTy)->getElementType());