llvm.org GIT mirror llvm / 87f7e75
Fix crash with an insertvalue that produces an empty object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218171 91177308-0d34-0410-b5e6-96231b3b80d8 Peter Collingbourne 5 years ago
2 changed file(s) with 13 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
33053305 unsigned NumAggValues = AggValueVTs.size();
33063306 unsigned NumValValues = ValValueVTs.size();
33073307 SmallVector Values(NumAggValues);
3308
3309 // Ignore an insertvalue that produces an empty object
3310 if (!NumAggValues) {
3311 setValue(&I, DAG.getUNDEF(MVT(MVT::Other)));
3312 return;
3313 }
33083314
33093315 SDValue Agg = getValue(Op0);
33103316 unsigned i = 0;
0 ; RUN: llc < %s
1
2 define void @f() {
3 entry:
4 %0 = insertvalue { [0 x { i8*, i8* }], [0 x { i8*, i64 }] } undef, [0 x { i8*, i8* }] undef, 0
5 ret void
6 }