mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
LICM: fix a wrong tuple type when splitting loads
When creating a tuple, the type needs to be specified because otherwise, if the original tuple has labels, it will cause a type mismatch verification error. rdar://152588539
This commit is contained in:
@@ -1148,7 +1148,7 @@ SingleValueInstruction *LoopTreeOptimization::splitLoad(
|
||||
}
|
||||
elements.push_back(elementVal);
|
||||
}
|
||||
return builder.createTuple(loc, elements);
|
||||
return builder.createTuple(loc, loadTy.getObjectType(), elements);
|
||||
}
|
||||
auto structTy = loadTy.getStructOrBoundGenericStruct();
|
||||
assert(structTy && "tuple and struct elements are checked earlier");
|
||||
|
||||
Reference in New Issue
Block a user