mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +00:00
Don't crash on packed logical ops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27125 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fdbc82a925
commit
98509ef3c7
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user