[llvm] [FastISel] Give PHI incoming materializations a debug location (PR #223677)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 07:47:42 PDT 2026
================
@@ -0,0 +1,114 @@
+; RUN: llc -O0 %s -o - | FileCheck %s
+
+;; A loop header's PHI nodes are set up in the predecessor. When every incoming
+;; value is a constant, that code used to be left without a source location, so
+;; the loop's line got its first is_stmt entry inside the header. The header is
+;; also the target of the back edge, so a breakpoint on that line was hit once
+;; per iteration. This is the shape flang emits for a whole-array assignment,
+;; integer :: arr(4)
+;; arr = 11
+
+;; A loop the function falls into: everything from the first block label onwards
+;; belongs to it, so prologue_end has to be reached before one is seen.
+; CHECK-LABEL: fill_local_:
+; CHECK-NOT: {{^\.LBB}}
+; CHECK: .loc {{[0-9]+}} 3 3 prologue_end
+
+;; The same through a dummy argument, which reproduces once the loop has been
+;; rotated and the induction variable starts from a negative constant.
+; CHECK-LABEL: fill_arg_:
+; CHECK-NOT: {{^\.LBB}}
----------------
jeanPerier wrote:
Updated test does not rely on -NOT checks.
https://github.com/llvm/llvm-project/pull/223677
More information about the llvm-commits
mailing list