[llvm] [InstCombine] Retain debug information on store to null instruction (PR #86105)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 3 02:59:28 PDT 2024
================
@@ -0,0 +1,30 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
+; Verify whether debug information is attached to the store to null/undef instruction
+; !dbg should be present at the end of "store to null" instruction
+; RUN: opt -S -passes='instcombine' < %s | FileCheck %s > /dev/null
+
+source_filename = "test.ll"
+target triple = "hexagon"
+
+define void @_Z3foov() {
+; CHECK-LABEL: define void @_Z3foov() {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: store i1 true, ptr poison, align 1, !dbg
----------------
nikic wrote:
And now you're back to manually modifying the CHECK lines. You need to run update_test_checks.py with the correct opt binary. The call will look something like `llvm/utils/update_test_checks.py --opt-binary build/bin/opt llvm/test/Transforms/InstCombine/StoreToNull-DbgCheck.ll` (obviously after you have built LLVM with your changes...) If you do that, then this should produce something like `, !dbg [[DBG1:![0-9]+]]`.
https://github.com/llvm/llvm-project/pull/86105
More information about the llvm-commits
mailing list