Skip to content
Snippets Groups Projects
Commit d6e160d1 authored by Chris Lattner's avatar Chris Lattner
Browse files

64-bit bugfix: 0xFFFF0000 cannot be formed with a single lis.

llvm-svn: 28880
parent 2d4e8f7e
No related branches found
No related tags found
No related merge requests found
...@@ -143,7 +143,11 @@ def immZExt16 : PatLeaf<(imm), [{ ...@@ -143,7 +143,11 @@ def immZExt16 : PatLeaf<(imm), [{
def imm16Shifted : PatLeaf<(imm), [{ def imm16Shifted : PatLeaf<(imm), [{
// imm16Shifted predicate - True if only bits in the top 16-bits of the // imm16Shifted predicate - True if only bits in the top 16-bits of the
// immediate are set. Used by instructions like 'addis'. // immediate are set. Used by instructions like 'addis'.
return ((unsigned)N->getValue() & 0xFFFF0000U) == (unsigned)N->getValue(); if (N->getValue() & 0xFFFF) return false;
if (N->getValueType(0) == MVT::i32)
return true;
// For 64-bit, make sure it is sext right.
return N->getValue() == (uint64_t)(int)N->getValue();
}], HI16>; }], HI16>;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment