mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
Fix an assertion failure caused by v1i64 in DAGCombiner Shrink.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209798 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -6047,18 +6047,14 @@ bool AArch64TargetLowering::isTruncateFree(Type *Ty1, Type *Ty2) const {
|
||||
return false;
|
||||
unsigned NumBits1 = Ty1->getPrimitiveSizeInBits();
|
||||
unsigned NumBits2 = Ty2->getPrimitiveSizeInBits();
|
||||
if (NumBits1 <= NumBits2)
|
||||
return false;
|
||||
return true;
|
||||
return NumBits1 > NumBits2;
|
||||
}
|
||||
bool AArch64TargetLowering::isTruncateFree(EVT VT1, EVT VT2) const {
|
||||
if (!VT1.isInteger() || !VT2.isInteger())
|
||||
if (VT1.isVector() || VT2.isVector() || !VT1.isInteger() || !VT2.isInteger())
|
||||
return false;
|
||||
unsigned NumBits1 = VT1.getSizeInBits();
|
||||
unsigned NumBits2 = VT2.getSizeInBits();
|
||||
if (NumBits1 <= NumBits2)
|
||||
return false;
|
||||
return true;
|
||||
return NumBits1 > NumBits2;
|
||||
}
|
||||
|
||||
// All 32-bit GPR operations implicitly zero the high-half of the corresponding
|
||||
@@ -6068,18 +6064,14 @@ bool AArch64TargetLowering::isZExtFree(Type *Ty1, Type *Ty2) const {
|
||||
return false;
|
||||
unsigned NumBits1 = Ty1->getPrimitiveSizeInBits();
|
||||
unsigned NumBits2 = Ty2->getPrimitiveSizeInBits();
|
||||
if (NumBits1 == 32 && NumBits2 == 64)
|
||||
return true;
|
||||
return false;
|
||||
return NumBits1 == 32 && NumBits2 == 64;
|
||||
}
|
||||
bool AArch64TargetLowering::isZExtFree(EVT VT1, EVT VT2) const {
|
||||
if (!VT1.isInteger() || !VT2.isInteger())
|
||||
if (VT1.isVector() || VT2.isVector() || !VT1.isInteger() || !VT2.isInteger())
|
||||
return false;
|
||||
unsigned NumBits1 = VT1.getSizeInBits();
|
||||
unsigned NumBits2 = VT2.getSizeInBits();
|
||||
if (NumBits1 == 32 && NumBits2 == 64)
|
||||
return true;
|
||||
return false;
|
||||
return NumBits1 == 32 && NumBits2 == 64;
|
||||
}
|
||||
|
||||
bool AArch64TargetLowering::isZExtFree(SDValue Val, EVT VT2) const {
|
||||
@@ -6092,8 +6084,9 @@ bool AArch64TargetLowering::isZExtFree(SDValue Val, EVT VT2) const {
|
||||
return false;
|
||||
|
||||
// 8-, 16-, and 32-bit integer loads all implicitly zero-extend.
|
||||
return (VT1.isSimple() && VT1.isInteger() && VT2.isSimple() &&
|
||||
VT2.isInteger() && VT1.getSizeInBits() <= 32);
|
||||
return (VT1.isSimple() && !VT1.isVector() && VT1.isInteger() &&
|
||||
VT2.isSimple() && !VT2.isVector() && VT2.isInteger() &&
|
||||
VT1.getSizeInBits() <= 32);
|
||||
}
|
||||
|
||||
bool AArch64TargetLowering::hasPairedLoad(Type *LoadedType,
|
||||
|
||||
Reference in New Issue
Block a user