File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
lib/SILOptimizer/Differentiation Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -2101,14 +2101,14 @@ static SILValue getArrayValue(ApplyInst *ai) {
2101
2101
auto *dti = dyn_cast<DestructureTupleInst>(use->getUser ());
2102
2102
if (!dti)
2103
2103
continue ;
2104
- assert (!arrayValue && " Array value already found" );
2104
+ DEBUG_ASSERT (!arrayValue && " Array value already found" );
2105
2105
// The first `destructure_tuple` result is the `Array` value.
2106
2106
arrayValue = dti->getResult (0 );
2107
- #ifdef NDEBUG
2107
+ #ifndef DEBUG_ASSERT_enabled
2108
2108
break ;
2109
2109
#endif
2110
2110
}
2111
- assert (arrayValue);
2111
+ ASSERT (arrayValue);
2112
2112
return arrayValue;
2113
2113
}
2114
2114
@@ -2567,15 +2567,12 @@ bool PullbackCloner::Implementation::run() {
2567
2567
// invariants hold and then skip.
2568
2568
if (auto *ai = getAllocateUninitializedArrayIntrinsicElementAddress (
2569
2569
bbActiveValue)) {
2570
- #ifndef NDEBUG
2571
- assert (isa<PointerToAddressInst>(bbActiveValue));
2572
-
2570
+ ASSERT (isa<PointerToAddressInst>(bbActiveValue));
2573
2571
SILValue arrayValue = getArrayValue (ai);
2574
- assert (llvm::find (bbActiveValues, arrayValue) !=
2572
+ ASSERT (llvm::find (bbActiveValues, arrayValue) !=
2575
2573
bbActiveValues.end ());
2576
- assert (vjpCloner.getLoopInfo ()->getLoopFor (
2574
+ ASSERT (vjpCloner.getLoopInfo ()->getLoopFor (
2577
2575
arrayValue->getParentBlock ()) == loop);
2578
- #endif
2579
2576
LLVM_DEBUG (llvm::dbgs () << " skipping: " << bbActiveValue);
2580
2577
break ;
2581
2578
}
You can’t perform that action at this time.
0 commit comments