This is consistent with MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214981
91177308-0d34-0410-b5e6-
96231b3b80d8
unsigned ArgWords = 0;
for (Function::const_arg_iterator AI = F->arg_begin(), AE = F->arg_end();
AI != AE; ++AI) {
+ // Skip arguments in registers to handle typical fastcall lowering.
+ if (F->getAttributes().hasAttribute(AI->getArgNo() + 1, Attribute::InReg))
+ continue;
Type *Ty = AI->getType();
// 'Dereference' type in case of byval or inalloca parameter attribute.
if (AI->hasByValOrInAllocaAttr())
define x86_fastcallcc void @h(i32 inreg %x, i32 inreg %y, %struct.Six* byval %a) {
ret void
}
-; FIXME: This should be @h@8.
-; CHECK-LABEL: @h@16:
+; CHECK-LABEL: @h@8:
; CHECK: retl $8
ret i32 %3
}
-; CHECK-LABEL: @fastcall_thunk@8:
+; CHECK-LABEL: @fastcall_thunk@4:
; CHECK-NOT: mov %{{.*}}, {{.*(.*esp.*)}}
; CHECK: jmpl
; CHECK-NOT: ret