[polly] 8422bfa - [polly] Fix regression tests with POLLY_ENABLE_GPGPU_CODEGEN

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 18 18:43:28 PDT 2021


Author: Eli Friedman
Date: 2021-07-18T18:43:01-07:00
New Revision: 8422bfa3c3bde72dfa544a15ed95222765ef20b2

URL: https://github.com/llvm/llvm-project/commit/8422bfa3c3bde72dfa544a15ed95222765ef20b2
DIFF: https://github.com/llvm/llvm-project/commit/8422bfa3c3bde72dfa544a15ed95222765ef20b2.diff

LOG: [polly] Fix regression tests with POLLY_ENABLE_GPGPU_CODEGEN

Apparently there was a latent bug here.

Added: 
    

Modified: 
    polly/lib/CodeGen/BlockGenerators.cpp

Removed: 
    


################################################################################
diff  --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp
index 946bc09b359e..f8cc47ca5a05 100644
--- a/polly/lib/CodeGen/BlockGenerators.cpp
+++ b/polly/lib/CodeGen/BlockGenerators.cpp
@@ -802,7 +802,8 @@ void BlockGenerator::generateScalarStores(
           // The new Val might have a 
diff erent 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);
         });


        


More information about the llvm-commits mailing list