[CUDA] Assert if we enter TAS pass
@@ -526,6 +526,8 @@ TargetAddressSpaces::runOnModule(llvm::Module &M) {
return false;
#endif
+ assert(!arch.startswith("nvptx"));
+
std::map<unsigned, unsigned> addrSpaceMapUp;
addrSpaceMapUp[POCL_FAKE_AS_GLOBAL] = POCL_AS_FAKE_GLOBAL;
@@ -565,11 +567,6 @@ TargetAddressSpaces::runOnModule(llvm::Module &M) {
addrSpaceMapDown[POCL_AS_FAKE_GLOBAL] = 1;
addrSpaceMapDown[POCL_AS_FAKE_LOCAL] = 3;
addrSpaceMapDown[POCL_AS_FAKE_CONSTANT] = 2;
- } else if (arch.startswith("nvptx")) {
- addrSpaceMapDown[POCL_AS_FAKE_GENERIC] = 0;
- addrSpaceMapDown[POCL_AS_FAKE_GLOBAL] = 1;
- addrSpaceMapDown[POCL_AS_FAKE_LOCAL] = 3;
- addrSpaceMapDown[POCL_AS_FAKE_CONSTANT] = 1;
} else {
/* Assume the fake address space map works directly in case not
overridden here. */
