From 6711f40c71ff3ccaa5806d29e26f48fa53a65377 Mon Sep 17 00:00:00 2001 From: William Moses Date: Mon, 15 Sep 2025 10:33:25 -0500 Subject: [PATCH] [SimplifyCFG] Refine metadata handling during instruction hoisting (llvm#158448) Co-authored-by: Nikita Popov (cherry picked from commit c44e015) --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 12dd49da279b9..427d7a3d510d2 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -3439,7 +3439,7 @@ bool SimplifyCFGOpt::speculativelyExecuteBB(BranchInst *BI, if (!SpeculatedStoreValue || &I != SpeculatedStore) { // Don't update the DILocation of dbg.assign intrinsics. if (!isa(&I)) - I.setDebugLoc(DebugLoc()); + I.dropLocation(); } I.dropUBImplyingAttrsAndMetadata();