[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrInfo.cpp

Vikram Adve vadve at cs.uiuc.edu
Thu Jul 10 14:49:01 PDT 2003


Changes in directory llvm/lib/Target/Sparc:

SparcInstrInfo.cpp updated: 1.48 -> 1.49

---
Log message:

Bug fix in creating constants: need 1U << 31, not 1 << 31.


---
Diffs of the changes:

Index: llvm/lib/Target/Sparc/SparcInstrInfo.cpp
diff -u llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.48 llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.49
--- llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.48	Mon Jun 30 16:58:49 2003
+++ llvm/lib/Target/Sparc/SparcInstrInfo.cpp	Thu Jul 10 14:48:19 2003
@@ -264,7 +264,7 @@
   static const uint64_t lo32 = (uint32_t) ~0;
   if (C <= lo32)                        // High 32 bits are 0.  Set low 32 bits.
     CreateSETUWConst(target, (uint32_t) C, dest, mvec);
-  else if ((C & ~lo32) == ~lo32 && (C & (1 << 31))) {
+  else if ((C & ~lo32) == ~lo32 && (C & (1U << 31))) {
     // All high 33 (not 32) bits are 1s: sign-extension will take care
     // of high 32 bits, so use the sequence for signed int
     CreateSETSWConst(target, (int32_t) C, dest, mvec);





More information about the llvm-commits mailing list