mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
Drop assert that a call with struct return goes to a function with sret
attribute. Clang incorrectly misses it on __muldc3 and friends and the type system doesn't include it properly either. llvm-svn: 250938
This commit is contained in:
parent
96b3931380
commit
314bf5d434
@ -1040,8 +1040,8 @@ SparcTargetLowering::getSRetArgSize(SelectionDAG &DAG, SDValue Callee) const
|
||||
if (!CalleeFn)
|
||||
return 0;
|
||||
|
||||
assert(CalleeFn->hasStructRetAttr() &&
|
||||
"Callee does not have the StructRet attribute.");
|
||||
// It would be nice to check for the sret attribute on CalleeFn here,
|
||||
// but since it is not part of the function type, any check will misfire.
|
||||
|
||||
PointerType *Ty = cast<PointerType>(CalleeFn->arg_begin()->getType());
|
||||
Type *ElementTy = Ty->getElementType();
|
||||
|
9
test/CodeGen/SPARC/missing-sret.ll
Normal file
9
test/CodeGen/SPARC/missing-sret.ll
Normal file
@ -0,0 +1,9 @@
|
||||
; RUN: llc -march=sparc -filetype=obj < %s > /dev/null 2> %t2
|
||||
|
||||
define void @mul_double_cc({ double, double }* noalias sret %agg.result, double %a, double %b, double %c, double %d) {
|
||||
entry:
|
||||
call void @__muldc3({ double, double }* sret %agg.result, double %a, double %b, double %c, double %d)
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @__muldc3({ double, double }*, double, double, double, double)
|
Loading…
Reference in New Issue
Block a user