[llvm] [DebugInfo][NaryReassociate] Fix missing debug location updates (PR #92545)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 06:19:49 PDT 2024
================
@@ -0,0 +1,88 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
+; RUN: opt < %s -passes=nary-reassociate -S | FileCheck %s
+
+; Test that NaryReassociate's tryReassociatedBinaryOp() propagates the
+; debug location to new `add` and `mul` from the original binary operator
+; they replaced (`%3` in both `@add_reassociate` and `@mul_reassociate`).
+; Because there are more than one identical binary operators in the optimized
+; program, autogenerated checks are used to check the whole program.
----------------
OCHyams wrote:
Can we remove the !dbg attachments (and metadata definitions which will become unused) from all the instructions that do not contribute to the new debug location? That helps to keep the test targeted and easy to read, and reduces the chance it'll get accidentally incorrectly regenerated in the future.
https://github.com/llvm/llvm-project/pull/92545
More information about the llvm-commits
mailing list