Index: lib/Target/X86/X86CallingConv.td =================================================================== --- lib/Target/X86/X86CallingConv.td +++ lib/Target/X86/X86CallingConv.td @@ -642,7 +642,7 @@ // Integer/FP values get stored in stack slots that are 8 bytes in size and // 8-byte aligned if there are no more registers to hold them. - CCIfType<[i32, i64, f32, f64], CCAssignToStack<8, 8>> + CCIfType<[i8, i16, i32, i64, f32, f64], CCAssignToStack<8, 8>> ]>; def CC_X86_Win64_VectorCall : CallingConv<[ Index: test/CodeGen/X86/win64-smallparams.ll =================================================================== --- /dev/null +++ test/CodeGen/X86/win64-smallparams.ll @@ -0,0 +1,19 @@ +; RUN: llc < %s -mtriple=x86_64-windows-msvc | FileCheck %s --check-prefix=CHECK +; RUN: llc < %s -mtriple=x86_64-windows-gnu | FileCheck %s --check-prefix=CHECK + +define dso_local void @call() { +entry: + tail call void @manyargs(i8 1, i16 2, i8 3, i16 4, i8 5, i16 6) + ret void +} + +declare dso_local void @manyargs(i8, i16, i8, i16, i8, i16) + +; CHECK-LABEL: call: +; CHECK-DAG: movw $6, 40(%rsp) +; CHECK-DAG: movb $5, 32(%rsp) +; CHECK-DAG: movb $1, %cl +; CHECK-DAG: movw $2, %dx +; CHECK-DAG: movb $3, %r8b +; CHECK-DAG: movw $4, %r9w +; CHECK: callq manyargs