mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-27 07:12:06 +00:00
a9355d3c68
with an additional fix to make RegAllocFast ignore undef physreg uses. It would previously get confused about the "push %eax" instruction's use of eax. That method for adjusting the stack pointer is used in X86FrameLowering::emitSPUpdate as well, but since that runs after register-allocation, we didn't run into the RegAllocFast issue before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269949 91177308-0d34-0410-b5e6-96231b3b80d8
28 lines
689 B
LLVM
28 lines
689 B
LLVM
; RUN: llc < %s -mtriple=i686-pc-win32 | FileCheck %s
|
|
|
|
%Foo = type { i32, i32 }
|
|
|
|
declare x86_stdcallcc void @f(%Foo* inalloca %a)
|
|
declare x86_stdcallcc void @i(i32 %a)
|
|
|
|
define void @g() {
|
|
; CHECK-LABEL: _g:
|
|
%b = alloca inalloca %Foo
|
|
; CHECK: pushl %eax
|
|
; CHECK: pushl %eax
|
|
%f1 = getelementptr %Foo, %Foo* %b, i32 0, i32 0
|
|
%f2 = getelementptr %Foo, %Foo* %b, i32 0, i32 1
|
|
store i32 13, i32* %f1
|
|
store i32 42, i32* %f2
|
|
; CHECK: movl %esp, %eax
|
|
; CHECK: movl $13, (%eax)
|
|
; CHECK: movl $42, 4(%eax)
|
|
call x86_stdcallcc void @f(%Foo* inalloca %b)
|
|
; CHECK: calll _f@8
|
|
; CHECK-NOT: %esp
|
|
; CHECK: pushl
|
|
; CHECK: calll _i@4
|
|
call x86_stdcallcc void @i(i32 0)
|
|
ret void
|
|
}
|