Revert "[AtomicExpand] Allow libcall expansion for non-zero address spaces" for buildbot failures.

llvm-svn: 355461
diff --git a/llvm/lib/CodeGen/AtomicExpandPass.cpp b/llvm/lib/CodeGen/AtomicExpandPass.cpp
index 10dd21d..c247a8a 100644
--- a/llvm/lib/CodeGen/AtomicExpandPass.cpp
+++ b/llvm/lib/CodeGen/AtomicExpandPass.cpp
@@ -1691,14 +1691,8 @@
   }
 
   // 'ptr' argument.
-  // note: This assumes all address spaces share a common libfunc
-  // implementation and that addresses are convertable.  For systems without
-  // that property, we'd need to extend this mechanism to support AS-specific
-  // families of atomic intrinsics.
-  auto PtrTypeAS = PointerOperand->getType()->getPointerAddressSpace();
-  Value *PtrVal = Builder.CreateBitCast(PointerOperand,
-                                        Type::getInt8PtrTy(Ctx, PtrTypeAS));
-  PtrVal = Builder.CreateAddrSpaceCast(PtrVal, Type::getInt8PtrTy(Ctx));
+  Value *PtrVal =
+      Builder.CreateBitCast(PointerOperand, Type::getInt8PtrTy(Ctx));
   Args.push_back(PtrVal);
 
   // 'expected' argument, if present.