Fixed use of phi param in SlotIndex constructors.
authorLang Hames <lhames@gmail.com>
Sat, 19 Dec 2009 23:32:32 +0000 (23:32 +0000)
committerLang Hames <lhames@gmail.com>
Sat, 19 Dec 2009 23:32:32 +0000 (23:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91790 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/SlotIndexes.h

index 9a85ee1fbf2c1e61c3f1eb3a7ed801d1ddc61fe1..f4eaffa40d398456929fd7ad90c126515f3f699a 100644 (file)
@@ -176,7 +176,7 @@ namespace llvm {
     // Construct a new slot index from the given one, set the phi flag on the
     // new index to the value of the phi parameter.
     SlotIndex(const SlotIndex &li, bool phi)
-      : lie(&li.entry(), phi ? PHI_BIT & li.getSlot() : (unsigned)li.getSlot()){
+      : lie(&li.entry(), phi ? PHI_BIT | li.getSlot() : (unsigned)li.getSlot()){
       assert(lie.getPointer() != 0 &&
              "Attempt to construct index with 0 pointer.");
     }
@@ -184,7 +184,7 @@ namespace llvm {
     // Construct a new slot index from the given one, set the phi flag on the
     // new index to the value of the phi parameter, and the slot to the new slot.
     SlotIndex(const SlotIndex &li, bool phi, Slot s)
-      : lie(&li.entry(), phi ? PHI_BIT & s : (unsigned)s) {
+      : lie(&li.entry(), phi ? PHI_BIT | s : (unsigned)s) {
       assert(lie.getPointer() != 0 &&
              "Attempt to construct index with 0 pointer.");
     }