[X86] Fix a bug that when lowering byval argument
authorLiu, Chen3 <chen3.liu@intel.com>
Tue, 7 Jul 2020 13:22:27 +0000 (21:22 +0800)
committerLiu, Chen3 <chen3.liu@intel.com>
Tue, 7 Jul 2020 13:49:31 +0000 (21:49 +0800)
commitea85ff82c82687496453bc14c4ac60548a42d8f3
tree62fe13e8a65180cfb271edc085a5c14f1ddb9b22
parented39becd274dae5537c24b2107737d718527e718
[X86] Fix a bug that when lowering byval argument

When an argument has 'byval' attribute and should be
passed on the stack according calling convention,
a stack copy would be emitted twice. This will cause
the real value will be put into stack where the pointer
should be passed.

Differential Revision: https://reviews.llvm.org/D83175
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.h
llvm/test/CodeGen/X86/win64-byval.ll