[llvm] [DebugInfo][Reassociate] Fix missing debug location drop (PR #95355)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 00:56:48 PDT 2024


================
@@ -845,6 +845,7 @@ static Value *NegateValue(Value *V, Instruction *BI,
     }
 
     TheNeg->moveBefore(*InsertPt->getParent(), InsertPt);
+    TheNeg->dropLocation();
----------------
OCHyams wrote:

I don't think we want to add any analyses here. I think if we just check if the `InsertPt ` BB is different to `TheNeg` BB (then drop the location) that should be enough?

https://github.com/llvm/llvm-project/pull/95355


More information about the llvm-commits mailing list