mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Choose register instead of immediate for ConstantExpr in ChooseRegOrImmed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7112 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
786833ad34
commit
97539fc4b6
@ -91,9 +91,10 @@ ChooseRegOrImmed(Value* val,
|
||||
|
||||
// To use reg or immed, constant needs to be integer, bool, or a NULL pointer
|
||||
Constant *CPV = dyn_cast<Constant>(val);
|
||||
if (CPV == NULL ||
|
||||
(! CPV->getType()->isIntegral() &&
|
||||
! (isa<PointerType>(CPV->getType()) && CPV->isNullValue())))
|
||||
if (CPV == NULL
|
||||
|| CPV->isConstantExpr()
|
||||
|| (! CPV->getType()->isIntegral() &&
|
||||
! (isa<PointerType>(CPV->getType()) && CPV->isNullValue())))
|
||||
return MachineOperand::MO_VirtualRegister;
|
||||
|
||||
// Now get the constant value and check if it fits in the IMMED field.
|
||||
|
@ -91,9 +91,10 @@ ChooseRegOrImmed(Value* val,
|
||||
|
||||
// To use reg or immed, constant needs to be integer, bool, or a NULL pointer
|
||||
Constant *CPV = dyn_cast<Constant>(val);
|
||||
if (CPV == NULL ||
|
||||
(! CPV->getType()->isIntegral() &&
|
||||
! (isa<PointerType>(CPV->getType()) && CPV->isNullValue())))
|
||||
if (CPV == NULL
|
||||
|| CPV->isConstantExpr()
|
||||
|| (! CPV->getType()->isIntegral() &&
|
||||
! (isa<PointerType>(CPV->getType()) && CPV->isNullValue())))
|
||||
return MachineOperand::MO_VirtualRegister;
|
||||
|
||||
// Now get the constant value and check if it fits in the IMMED field.
|
||||
|
Loading…
x
Reference in New Issue
Block a user