Skip to content

Commit 0915691

Browse files
authored
Refactor debug location handling in SimplifyCFG
1 parent f02a8fc commit 0915691

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Transforms/Utils/SimplifyCFG.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3393,9 +3393,8 @@ bool SimplifyCFGOpt::speculativelyExecuteBB(BranchInst *BI,
33933393
// Similarly strip attributes that maybe dependent on condition we are
33943394
// hoisting above.
33953395
for (auto &I : make_early_inc_range(*ThenBB)) {
3396-
if ((!SpeculatedStoreValue || &I != SpeculatedStore) &&
3397-
!isa<CallBase>(&I)) {
3398-
I.setDebugLoc(DebugLoc::getDropped());
3396+
if (!SpeculatedStoreValue || &I != SpeculatedStore) {
3397+
I.dropLocation();
33993398
}
34003399
I.dropUBImplyingAttrsAndMetadata();
34013400

0 commit comments

Comments
 (0)