diff options
author | Yaxun Liu <Yaxun.Liu@amd.com> | 2017-11-16 12:22:19 +0000 |
---|---|---|
committer | Yaxun Liu <Yaxun.Liu@amd.com> | 2017-11-16 12:22:19 +0000 |
commit | 0844ff2aa7f9e884d4d0b83e6cfdd945072cca93 (patch) | |
tree | 91d79f015c3e603153504cfd251235a2c8963f94 /llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll | |
parent | 46304e03ecb09ae31f535a0974ef4df165eb947f (diff) | |
download | bcm5719-llvm-0844ff2aa7f9e884d4d0b83e6cfdd945072cca93.tar.gz bcm5719-llvm-0844ff2aa7f9e884d4d0b83e6cfdd945072cca93.zip |
Fix pointer EVT in SelectionDAGBuilder::visitAlloca
SelectionDAGBuilder::visitAlloca assumes alloca address space is 0, which is
incorrect for triple amdgcn---amdgiz and causes isel failure.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D40095
llvm-svn: 318392
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll')
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll b/llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll index b1107ea7fbc..d0efd07497d 100644 --- a/llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll +++ b/llvm/test/CodeGen/AMDGPU/dynamic_stackalloc.ll @@ -1,11 +1,12 @@ -; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=+promote-alloca -verify-machineinstrs < %s 2>&1 | FileCheck %s -; RUN: not llc -march=amdgcn -mcpu=tahiti -mattr=-promote-alloca -verify-machineinstrs < %s 2>&1 | FileCheck %s -; RUN: not llc -march=r600 -mcpu=cypress < %s 2>&1 | FileCheck %s +; RUN: not llc -march=amdgcn -mtriple=amdgcn---amdgiz -mcpu=tahiti -mattr=+promote-alloca -verify-machineinstrs < %s 2>&1 | FileCheck %s +; RUN: not llc -march=amdgcn -mtriple=amdgcn---amdgiz -mcpu=tahiti -mattr=-promote-alloca -verify-machineinstrs < %s 2>&1 | FileCheck %s +; RUN: not llc -march=r600 -mtriple=r600---amdgiz -mcpu=cypress < %s 2>&1 | FileCheck %s +target datalayout = "A5" ; CHECK: in function test_dynamic_stackalloc{{.*}}: unsupported dynamic alloca define amdgpu_kernel void @test_dynamic_stackalloc(i32 addrspace(1)* %out, i32 %n) { - %alloca = alloca i32, i32 %n - store volatile i32 0, i32* %alloca + %alloca = alloca i32, i32 %n, addrspace(5) + store volatile i32 0, i32 addrspace(5)* %alloca ret void } |