[llvm] [licm] clone metadata when hoisting conditional branch (PR #152232)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 10:27:36 PDT 2025
================
@@ -0,0 +1,46 @@
+; Test that hoising conditional branches copies over profiling metadata
+; RUN: opt -S -passes=licm -licm-control-flow-hoisting=1 %s -o - | FileCheck %s
+
+; CHECK-LABEL: @triangle_phi
+define void @triangle_phi(i32 %x, ptr %p) {
+; CHECK-LABEL: entry:
+; CHECK: %cmp1 = icmp sgt i32 %x, 0
+; CHECK: br i1 %cmp1, label %[[IF_LICM:.*]], label %[[THEN_LICM:.*]], !prof !0
----------------
mtrofin wrote:
I know I need to add a test for `!dbg`
https://github.com/llvm/llvm-project/pull/152232
More information about the llvm-commits
mailing list