File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -592,9 +592,7 @@ SILCloner<ImplClass>::getMappedValue(SILValue Value) {
592
592
// If we have undef, just remap the type.
593
593
if (auto *U = dyn_cast<SILUndef>(Value)) {
594
594
auto type = getOpType (U->getType ());
595
- ValueBase *undef =
596
- (type == U->getType () ? U : SILUndef::get (Builder.getFunction (), type));
597
- return SILValue (undef);
595
+ return SILUndef::get (Builder.getFunction (), type);
598
596
}
599
597
600
598
llvm_unreachable (" Unmapped value while cloning?" );
Original file line number Diff line number Diff line change @@ -1263,6 +1263,10 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
1263
1263
" instruction isn't dominated by its bb argument operand" );
1264
1264
}
1265
1265
1266
+ if (auto *undef = dyn_cast<SILUndef>(operand.get ())) {
1267
+ require (undef->getParent () == BB->getParent (), " SILUndef in wrong function" );
1268
+ }
1269
+
1266
1270
require (operand.getUser () == I,
1267
1271
" instruction's operand's owner isn't the instruction" );
1268
1272
require (isOperandInValueUses (&operand), " operand value isn't used by operand" );
You can’t perform that action at this time.
0 commit comments