1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -mem2reg -S | FileCheck %s
3 ; RUN: opt < %s -passes=mem2reg -S | FileCheck %s
7 target datalayout = "e-p:64:64-p5:32:32-A5"
9 define amdgpu_kernel void @addressspace_alloca() {
10 ; CHECK-LABEL: @addressspace_alloca(
11 ; CHECK-NEXT: ret void
13 %alloca = alloca i8, align 8, addrspace(5)
14 %cast = addrspacecast i8 addrspace(5)* %alloca to i8*
15 call void @llvm.lifetime.start.p0i8(i64 2, i8* %cast)
19 declare void @llvm.lifetime.start.p0i8(i64 %size, i8* nocapture %ptr)