summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-25 21:58:26 +0000
committerChris Lattner <sabre@nondot.org>2006-03-25 21:58:26 +0000
commitd70d9f5b24fea6c260cc719b86ad111acec1fe13 (patch)
treea6b370ae40844bef1553fbb2a0c039a2b6c06f82 /llvm/lib/Transforms
parente8e7ac465db76182fe09f97dcb9390f3f9d3866a (diff)
downloadbcm5719-llvm-d70d9f5b24fea6c260cc719b86ad111acec1fe13.tar.gz
bcm5719-llvm-d70d9f5b24fea6c260cc719b86ad111acec1fe13.zip
Don't crash on packed logical ops
llvm-svn: 27125
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 8341053fca7..397c6d6ecd6 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -2380,7 +2380,8 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) {
// See if we can simplify any instructions used by the instruction whose sole
// purpose is to compute bits we don't care about.
uint64_t KnownZero, KnownOne;
- if (SimplifyDemandedBits(&I, I.getType()->getIntegralTypeMask(),
+ if (!isa<PackedType>(I.getType()) &&
+ SimplifyDemandedBits(&I, I.getType()->getIntegralTypeMask(),
KnownZero, KnownOne))
return &I;
@@ -2624,7 +2625,8 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
// See if we can simplify any instructions used by the instruction whose sole
// purpose is to compute bits we don't care about.
uint64_t KnownZero, KnownOne;
- if (SimplifyDemandedBits(&I, I.getType()->getIntegralTypeMask(),
+ if (!isa<PackedType>(I.getType()) &&
+ SimplifyDemandedBits(&I, I.getType()->getIntegralTypeMask(),
KnownZero, KnownOne))
return &I;
@@ -2861,7 +2863,8 @@ Instruction *InstCombiner::visitXor(BinaryOperator &I) {
// See if we can simplify any instructions used by the instruction whose sole
// purpose is to compute bits we don't care about.
uint64_t KnownZero, KnownOne;
- if (SimplifyDemandedBits(&I, I.getType()->getIntegralTypeMask(),
+ if (!isa<PackedType>(I.getType()) &&
+ SimplifyDemandedBits(&I, I.getType()->getIntegralTypeMask(),
KnownZero, KnownOne))
return &I;
OpenPOWER on IntegriCloud