1 ; RUN: opt -S -deadargelim %s | FileCheck %s
3 ; DeadArgumentElimination should respect the function address space
6 target datalayout = "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8"
8 ; CHECK: define internal i32 @foo() addrspace(1)
9 define internal i32 @foo(i32 %x) #0 {
10 tail call void asm sideeffect inteldialect "mov eax, [esp + $$4]\0A\09ret", "~{eax},~{dirflag},~{fpsr},~{flags}"()
14 define i32 @f(i32 %x, i32 %y) {
15 ; CHECK: %r = call addrspace(1) i32 @foo()
16 %r = call i32 @foo(i32 %x)