mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Avoid doing something dumb like rewriting using a 64-bit iv in 32-bit mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43446 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dc4756bfda
commit
e127a73154
@ -5125,7 +5125,11 @@ bool X86TargetLowering::isLegalAddressingMode(const AddrMode &AM,
|
||||
bool X86TargetLowering::isTruncateFree(const Type *Ty1, const Type *Ty2) const {
|
||||
if (!Ty1->isInteger() || !Ty2->isInteger())
|
||||
return false;
|
||||
return Ty1->getPrimitiveSizeInBits() > Ty2->getPrimitiveSizeInBits();
|
||||
unsigned NumBits1 = Ty1->getPrimitiveSizeInBits();
|
||||
unsigned NumBits2 = Ty2->getPrimitiveSizeInBits();
|
||||
if (NumBits1 <= NumBits2)
|
||||
return false;
|
||||
return Subtarget->is64Bit() || NumBits1 < 64;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user