mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
Now that the call graph supports efficient replacement of a function and spurious reference edges, we can port ArgumentPromotion to the new pass manager very easily. The old PM-specific bits are sunk into callbacks that the new PM simply doesn't use. Unlike the old PM, the new PM simply does argument promotion and afterward does the update to LCG reflecting the promoted function. Differential Revision: https://reviews.llvm.org/D29580 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294667 91177308-0d34-0410-b5e6-96231b3b80d8
24 lines
566 B
LLVM
24 lines
566 B
LLVM
; RUN: opt %s -argpromotion -S -o - | FileCheck %s
|
|
; RUN: opt %s -passes=argpromotion -S -o - | FileCheck %s
|
|
; PR14710
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
|
|
%pair = type { i32, i32 }
|
|
|
|
declare i8* @foo(%pair*)
|
|
|
|
define internal void @bar(%pair* byval %Data) {
|
|
; CHECK: define internal void @bar(i32 %Data.0, i32 %Data.1)
|
|
; CHECK: %Data = alloca %pair
|
|
; CHECK-NOT: tail
|
|
; CHECK: call i8* @foo(%pair* %Data)
|
|
tail call i8* @foo(%pair* %Data)
|
|
ret void
|
|
}
|
|
|
|
define void @zed(%pair* byval %Data) {
|
|
call void @bar(%pair* byval %Data)
|
|
ret void
|
|
}
|