Revert 85678/85680.  The decision is to stay with the current form of 
indirectbr, thus we don't need "blockaddr(@func, null)".  Eliminate it
for simplicity.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85699 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp
index 9495100..49e9683 100644
--- a/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/lib/Transforms/IPO/GlobalOpt.cpp
@@ -2345,7 +2345,8 @@
         Value *Val = getVal(Values, IBI->getAddress())->stripPointerCasts();
         if (BlockAddress *BA = dyn_cast<BlockAddress>(Val))
           NewBB = BA->getBasicBlock();
-        if (NewBB == 0) return false;  // Cannot determine.
+        else
+          return false;  // Cannot determine.
       } else if (ReturnInst *RI = dyn_cast<ReturnInst>(CurInst)) {
         if (RI->getNumOperands())
           RetVal = getVal(Values, RI->getOperand(0));
diff --git a/lib/Transforms/Utils/ValueMapper.cpp b/lib/Transforms/Utils/ValueMapper.cpp
index 7929eb9..39331d7 100644
--- a/lib/Transforms/Utils/ValueMapper.cpp
+++ b/lib/Transforms/Utils/ValueMapper.cpp
@@ -113,13 +113,8 @@
   
   if (BlockAddress *BA = dyn_cast<BlockAddress>(C)) {
     Function *F = cast<Function>(MapValue(BA->getFunction(), VM));
-    BasicBlock *BB = 0;
-    if (BA->getBasicBlock()) {
-      BB = cast_or_null<BasicBlock>(MapValue(BA->getBasicBlock(),VM));
-      BB = BB ? BB : BA->getBasicBlock();
-    }
-    
-    return VM[V] = BlockAddress::get(F, BB);
+    BasicBlock *BB = cast_or_null<BasicBlock>(MapValue(BA->getBasicBlock(),VM));
+    return VM[V] = BlockAddress::get(F, BB ? BB : BA->getBasicBlock());
   }
   
   llvm_unreachable("Unknown type of constant!");