diff options
| author | Tobias Grosser <tobias@grosser.es> | 2016-09-13 08:02:14 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2016-09-13 08:02:14 +0000 |
| commit | b79f4d3970621b16a28202afb7c2e3c50256995d (patch) | |
| tree | b6b1ac353e973daaea6560d012c035119bc03685 /polly/lib/CodeGen/PPCGCodeGeneration.cpp | |
| parent | b906df9fe56374de7e11a1412424dee0d89739cf (diff) | |
| download | bcm5719-llvm-b79f4d3970621b16a28202afb7c2e3c50256995d.tar.gz bcm5719-llvm-b79f4d3970621b16a28202afb7c2e3c50256995d.zip | |
GPGPU: Extend types when array sizes have smaller types
This prevents a compiler crash.
llvm-svn: 281303
Diffstat (limited to 'polly/lib/CodeGen/PPCGCodeGeneration.cpp')
| -rw-r--r-- | polly/lib/CodeGen/PPCGCodeGeneration.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp index 654bf5bc1d2..1ade6c27540 100644 --- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp +++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp @@ -713,6 +713,8 @@ Value *GPUNodeBuilder::getArraySize(gpu_array_info *Array) { } Value *NumElements = ExprBuilder.create(Res); + if (NumElements->getType() != ArraySize->getType()) + NumElements = Builder.CreateSExt(NumElements, ArraySize->getType()); ArraySize = Builder.CreateMul(ArraySize, NumElements); } isl_ast_build_free(Build); |

