Files
clang-p2996/llvm/test/Transforms/DeadArgElim/nonzero-address-spaces.ll
Bjorn Pettersson e76ecbb0f3 [test] Use opt -passes syntax in DeadArgElim lit tests. NFC
The legacy PM is deprecated, so update a bunch of lit tests running
opt to use the new PM syntax when specifying the pipeline.
2022-01-17 18:14:36 +01:00

21 lines
565 B
LLVM

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