[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrInfo.td
Chris Lattner
lattner at cs.uiuc.edu
Tue Jun 20 14:39:42 PDT 2006
Changes in directory llvm/lib/Target/PowerPC:
PPCInstrInfo.td updated: 1.226 -> 1.227
---
Log message:
64-bit bugfix: 0xFFFF0000 cannot be formed with a single lis.
---
Diffs of the changes: (+5 -1)
PPCInstrInfo.td | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td
diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.226 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.227
--- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.226 Mon Jun 19 19:39:56 2006
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Tue Jun 20 16:39:30 2006
@@ -143,7 +143,11 @@
def imm16Shifted : PatLeaf<(imm), [{
// imm16Shifted predicate - True if only bits in the top 16-bits of the
// 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>;
More information about the llvm-commits
mailing list