diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-09-14 18:02:29 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-09-14 18:02:29 +0000 |
commit | 37ab4cf8b8f88b394273e26440682d78254ad304 (patch) | |
tree | f24d1141171af2290f32487d98989172ec20f259 /llvm/test/CodeGen/AMDGPU/promote-alloca-array-aggregate.ll | |
parent | 6819a7a1cb4b98217f8a8c304829d7bf26b6b20f (diff) | |
download | bcm5719-llvm-37ab4cf8b8f88b394273e26440682d78254ad304.tar.gz bcm5719-llvm-37ab4cf8b8f88b394273e26440682d78254ad304.zip |
AMDGPU: Fix assert on alloca of array of struct
llvm-svn: 313282
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/promote-alloca-array-aggregate.ll')
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/promote-alloca-array-aggregate.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/promote-alloca-array-aggregate.ll b/llvm/test/CodeGen/AMDGPU/promote-alloca-array-aggregate.ll index e2af0914913..deca2997100 100644 --- a/llvm/test/CodeGen/AMDGPU/promote-alloca-array-aggregate.ll +++ b/llvm/test/CodeGen/AMDGPU/promote-alloca-array-aggregate.ll @@ -11,6 +11,7 @@ %Block = type { [1 x float], i32 } %gl_PerVertex = type { <4 x float>, float, [1 x float], [1 x float] } +%struct = type { i32, i32 } @block = external addrspace(1) global %Block @pv = external addrspace(1) global %gl_PerVertex @@ -129,3 +130,11 @@ define amdgpu_ps void @promote_double_aggr() #0 { store <4 x float> %tmp21, <4 x float> addrspace(1)* @frag_color ret void } + +; Don't crash on a type that isn't a valid vector element. +; OPT-LABEL: @alloca_struct( +define amdgpu_kernel void @alloca_struct() #0 { +entry: + %alloca = alloca [2 x %struct], align 4 + ret void +} |