[polly] Fix regression tests with POLLY_ENABLE_GPGPU_CODEGEN

Apparently there was a latent bug here.

GitOrigin-RevId: 8422bfa3c3bde72dfa544a15ed95222765ef20b2
diff --git a/lib/CodeGen/BlockGenerators.cpp b/lib/CodeGen/BlockGenerators.cpp
index 946bc09..f8cc47c 100644
--- a/lib/CodeGen/BlockGenerators.cpp
+++ b/lib/CodeGen/BlockGenerators.cpp
@@ -802,7 +802,8 @@
           // The new Val might have a different type than the old Val due to
           // ScalarEvolution looking through bitcasts.
           Address = Builder.CreateBitOrPointerCast(
-              Address, Val->getType()->getPointerTo());
+              Address, Val->getType()->getPointerTo(
+                           Address->getType()->getPointerAddressSpace()));
 
           Builder.CreateStore(Val, Address);
         });