diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2015-02-13 19:05:03 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2015-02-13 19:05:03 +0000 |
| commit | 11a4d6774b7c98c55f225a02f982a91c781768d1 (patch) | |
| tree | b7945a3d3fc4b500fea27c0ecc6b76dcae4d57ec /llvm/lib/Target/R600/SIISelLowering.cpp | |
| parent | 8a9e404c0ef45034b6ff6878b3fce43bdada7d8e (diff) | |
| download | bcm5719-llvm-11a4d6774b7c98c55f225a02f982a91c781768d1.tar.gz bcm5719-llvm-11a4d6774b7c98c55f225a02f982a91c781768d1.zip | |
R600/SI: Allow f64 inline immediates in i64 operands
This requires considering the size of the operand when
checking immediate legality.
llvm-svn: 229135
Diffstat (limited to 'llvm/lib/Target/R600/SIISelLowering.cpp')
| -rw-r--r-- | llvm/lib/Target/R600/SIISelLowering.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/R600/SIISelLowering.cpp b/llvm/lib/Target/R600/SIISelLowering.cpp index d8cee5ae428..141ba80492f 100644 --- a/llvm/lib/Target/R600/SIISelLowering.cpp +++ b/llvm/lib/Target/R600/SIISelLowering.cpp @@ -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)) { |

