[llvm] [DFAJumpThreading] Propagate DebugLocs to branches in select unfolding (PR #205851)

Hongyu Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 2 08:19:25 PDT 2026


================
@@ -0,0 +1,89 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
+; RUN: opt -S -passes=dfa-jump-threading %s | FileCheck %s
+
+;; Tests that when we perform jump threading, creating a new path which doesn't
+;; require a switch statement at its end, we keep the switch statement's
+;; DebugLoc on the final unconditional branch, since the unconditional branch
+;; represents the switch (with a known outcome).
+
+source_filename = "reduced.ll"
+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-unknown-linux-gnu"
----------------
XChy wrote:

Are these necessary for reproduction?

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


More information about the llvm-commits mailing list