[llvm] [VPlan] Set debug location for VPReduction/VPWidenPHI/VPWidenIntrinsicRecipe. (PR #120054)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 04:39:14 PST 2024


================
@@ -0,0 +1,34 @@
+; RUN: opt < %s -passes=debugify,loop-vectorize -force-vector-width=4 -prefer-inloop-reductions -S | FileCheck %s -check-prefix DEBUGLOC
+
+; Testing the debug locations of the generated vector intstruction are same as
+; their scalar counterpart.
+
+define i32 @reduction_sum(ptr %A, ptr %B) {
+; DEBUGLOC-LABEL: define i32 @reduction_sum(
+; DEBUGLOC: vector.body:
+; DEBUGLOC:   = load <4 x i32>, ptr %2, align 4, !dbg ![[LOADLOC:[0-9]+]]
----------------
fhahn wrote:

please don't use IR value numbers

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


More information about the llvm-commits mailing list