Revert back 85006 for now as it breaks PIC16 tests.
[oota-llvm.git] / lib / Target / PIC16 / PIC16MemSelOpt.cpp
index 93ccdd249181051d38a52c9ad7a494530f0adc7c..a97dc35b137a0790b14473d5392ba88cd68faea3 100644 (file)
@@ -144,7 +144,7 @@ bool MemSelOpt::processInstruction(MachineInstr *MI) {
   }
 
   // Get the section name(NewBank) for MemOp.
-  // This assumes that the section names for globals are already set by
+  // This assumes that the section names for globals are laready set by
   // AsmPrinter->doInitialization.
   std::string NewBank = CurBank;
   if (Op.getType() ==  MachineOperand::MO_GlobalAddress &&
@@ -156,11 +156,7 @@ bool MemSelOpt::processInstruction(MachineInstr *MI) {
     std::string Sym = Op.getSymbolName();
     NewBank = PAN::getSectionNameForSym(Sym);
   }
-
-  // If the section is shared section, do not emit banksel.
-  if (NewBank == PAN::getSharedUDataSectionName())
-    return Changed;
-
   // If the previous and new section names are same, we don't need to
   // emit banksel. 
   if (NewBank.compare(CurBank) != 0 ) {