[llvm] [BranchFolder] Fix missing debug info with tail merging (PR #94715)
Jeremy Morse via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 02:54:19 PDT 2024
================
@@ -0,0 +1,31 @@
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -enable-tail-merge=1 -stop-after=branch-folder | FileCheck %s
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-grtev4-linux-gnu"
+
+define i32 @main(i1 %0) {
+entry:
+ br i1 %0, label %1, label %2
+
+1: ; preds = %entry
+ store i64 1, ptr null, align 1
+; CHECK: JMP_1 %bb.3, debug-location !3
----------------
jmorse wrote:
For debug-info tests we usually capture the metadata node number and then compare it against the definition further down (i.e. `![[FOONUM]] = !DILocation(...`). That way the test is stable even if the metadata numbers get re-ordered in the future.
https://github.com/llvm/llvm-project/pull/94715
More information about the llvm-commits
mailing list