mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
R600/SI: Allow f64 inline immediates in i64 operands
This requires considering the size of the operand when checking immediate legality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229135 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1734,13 +1734,11 @@ int32_t SITargetLowering::analyzeImmediate(const SDNode *N) const {
|
||||
static_cast<const SIInstrInfo *>(Subtarget->getInstrInfo());
|
||||
|
||||
if (const ConstantSDNode *Node = dyn_cast<ConstantSDNode>(N)) {
|
||||
if (Node->getZExtValue() >> 32)
|
||||
return -1;
|
||||
|
||||
if (TII->isInlineConstant(Node->getAPIntValue()))
|
||||
return 0;
|
||||
|
||||
return Node->getZExtValue();
|
||||
uint64_t Val = Node->getZExtValue();
|
||||
return isUInt<32>(Val) ? Val : -1;
|
||||
}
|
||||
|
||||
if (const ConstantFPSDNode *Node = dyn_cast<ConstantFPSDNode>(N)) {
|
||||
|
||||
Reference in New Issue
Block a user