[llvm-branch-commits] [llvm] [LoopInterchange] Drop loop metadata and branch weights of interchanged loops (PR #235892)

Madhur Amilkanthwar via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Nov 3 23:03:12 PST 2026


================
@@ -97,11 +97,11 @@ define void @branch_weights(ptr %A) {
 ; CHECK:       [[INNER_HEADER_SPLIT]]:
 ; CHECK-NEXT:    [[TMP0]] = add nuw nsw i64 [[J]], 1
 ; CHECK-NEXT:    [[TMP1:%.*]] = icmp eq i64 [[TMP0]], 64
-; CHECK-NEXT:    br i1 [[TMP1]], label %[[EXIT:.*]], label %[[INNER_HEADER]], !prof [[PROF5:![0-9]+]]
+; CHECK-NEXT:    br i1 [[TMP1]], label %[[EXIT:.*]], label %[[INNER_HEADER]]
----------------
madhur13490 wrote:

As mentioned on LoopInterchange.cpp L2188, the weights here (1:63 on the j branch, 127:1 on the i branch) were still correct after interchange, so I'd expect these CHECK lines to keep them.

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


More information about the llvm-branch-commits mailing list