mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[GlobalISel][X86] LowerCall, for now don't handel ByValue function arguments.
llvm-svn: 311321
This commit is contained in:
parent
b7598a7f77
commit
d0f60004ec
@ -322,6 +322,11 @@ bool X86CallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
|
||||
|
||||
SmallVector<ArgInfo, 8> SplitArgs;
|
||||
for (const auto &OrigArg : OrigArgs) {
|
||||
|
||||
// TODO: handle not simple cases.
|
||||
if (OrigArg.Flags.isByVal())
|
||||
return false;
|
||||
|
||||
if (!splitToValueTypes(OrigArg, SplitArgs, DL, MRI,
|
||||
[&](ArrayRef<unsigned> Regs) {
|
||||
MIRBuilder.buildUnmerge(Regs, OrigArg.Reg);
|
||||
|
@ -16,3 +16,14 @@ define void @test_x86_fp80_dump(x86_fp80* %ptr){
|
||||
ret void
|
||||
}
|
||||
|
||||
; Check that we fallback on byVal argument
|
||||
; FALLBACK-WITH-REPORT-ERR: remark: <unknown>:0:0: unable to translate instruction: call: ' call void @ScaleObjectOverwrite_3(%struct.PointListStruct* %index, %struct.PointListStruct* byval %index)' (in function: ScaleObjectOverwrite_2)
|
||||
; FALLBACK-WITH-REPORT-ERR: warning: Instruction selection used fallback path for ScaleObjectOverwrite_2
|
||||
; FALLBACK-WITH-REPORT-OUT-LABEL: ScaleObjectOverwrite_2:
|
||||
%struct.PointListStruct = type { i8*, i8* }
|
||||
declare void @ScaleObjectOverwrite_3(%struct.PointListStruct* %index, %struct.PointListStruct* byval %index2)
|
||||
define void @ScaleObjectOverwrite_2(%struct.PointListStruct* %index) {
|
||||
entry:
|
||||
call void @ScaleObjectOverwrite_3(%struct.PointListStruct* %index, %struct.PointListStruct* byval %index)
|
||||
ret void
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user