Files
clang-p2996/llvm/lib/Transforms/Scalar/Reassociate.cpp
Stephen Tozer 86405ed101 [DebugInfo][Reassociate] Preserve DebugLocs when reassociating subs (#114226)
In NegateValue in Reassociate, we return the negation of an existing
value in order to break a subtract into an negate + add, potentially
creating a new instruction to perform the negation, but we neglect to
propagate the DebugLoc of the sub being replaced to the negate
instruction if one is created. This patch adds that propagation.

Found using https://github.com/llvm/llvm-project/pull/107279.
2024-11-08 18:35:03 +00:00

101 KiB