mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-26 09:18:56 +00:00
Truncate from i64 to i32 is "free" on x86-32, because it involves
just discarding one of the registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97100 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7780,7 +7780,7 @@ bool X86TargetLowering::isTruncateFree(const Type *Ty1, const Type *Ty2) const {
|
|||||||
unsigned NumBits2 = Ty2->getPrimitiveSizeInBits();
|
unsigned NumBits2 = Ty2->getPrimitiveSizeInBits();
|
||||||
if (NumBits1 <= NumBits2)
|
if (NumBits1 <= NumBits2)
|
||||||
return false;
|
return false;
|
||||||
return Subtarget->is64Bit() || NumBits1 < 64;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool X86TargetLowering::isTruncateFree(EVT VT1, EVT VT2) const {
|
bool X86TargetLowering::isTruncateFree(EVT VT1, EVT VT2) const {
|
||||||
@@ -7790,7 +7790,7 @@ bool X86TargetLowering::isTruncateFree(EVT VT1, EVT VT2) const {
|
|||||||
unsigned NumBits2 = VT2.getSizeInBits();
|
unsigned NumBits2 = VT2.getSizeInBits();
|
||||||
if (NumBits1 <= NumBits2)
|
if (NumBits1 <= NumBits2)
|
||||||
return false;
|
return false;
|
||||||
return Subtarget->is64Bit() || NumBits1 < 64;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool X86TargetLowering::isZExtFree(const Type *Ty1, const Type *Ty2) const {
|
bool X86TargetLowering::isZExtFree(const Type *Ty1, const Type *Ty2) const {
|
||||||
|
Reference in New Issue
Block a user