1 ; RUN: opt -passes=dse -S < %s | FileCheck %s
3 ; Don't eliminate stores to allocas before tail calls to functions that use
4 ; byval. It's correct to mark calls like these as 'tail'. To implement this tail
5 ; call, the backend should copy the bytes from the alloca into the argument area
6 ; before clearing the stack.
8 target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
9 target triple = "i386-unknown-linux-gnu"
11 declare void @g(ptr byval(i32) %p)
13 define void @f(ptr byval(i32) %x) {
18 tail call void @g(ptr byval(i32) %p)
21 ; CHECK-LABEL: define void @f(ptr byval(i32) %x)
22 ; CHECK: store i32 %v, ptr %p
23 ; CHECK: tail call void @g(ptr byval(i32) %p)