mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-03 17:24:24 +00:00
Fix PR4975. Avoid referencing empty vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99840 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0ea86bc411
commit
8e36a5c960
@ -6051,8 +6051,10 @@ void SelectionDAGISel::LowerArguments(BasicBlock *LLVMBB) {
|
||||
}
|
||||
|
||||
if (!I->use_empty()) {
|
||||
SDValue Res = DAG.getMergeValues(&ArgValues[0], NumValues,
|
||||
SDB->getCurDebugLoc());
|
||||
SDValue Res;
|
||||
if (!ArgValues.empty())
|
||||
Res = DAG.getMergeValues(&ArgValues[0], NumValues,
|
||||
SDB->getCurDebugLoc());
|
||||
SDB->setValue(I, Res);
|
||||
|
||||
// If this argument is live outside of the entry block, insert a copy from
|
||||
|
17
test/CodeGen/Generic/2010-ZeroSizedArg.ll
Normal file
17
test/CodeGen/Generic/2010-ZeroSizedArg.ll
Normal file
@ -0,0 +1,17 @@
|
||||
; RUN: llc < %s
|
||||
; PR4975
|
||||
|
||||
%0 = type <{ [0 x i32] }>
|
||||
%union.T0 = type { }
|
||||
|
||||
@.str = private constant [1 x i8] c" "
|
||||
|
||||
define arm_apcscc void @t(%0) nounwind {
|
||||
entry:
|
||||
%arg0 = alloca %union.T0
|
||||
%1 = bitcast %union.T0* %arg0 to %0*
|
||||
store %0 %0, %0* %1, align 1
|
||||
ret void
|
||||
}
|
||||
|
||||
declare arm_apcscc i32 @printf(i8*, ...)
|
Loading…
x
Reference in New Issue
Block a user