[llvm] [LoopInterchange] Reject interchange when a freeze would move or be cloned (PR #213309)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 02:20:29 PDT 2026
================
@@ -0,0 +1,135 @@
+; A freeze whose execution count changes under interchange can resample poison
+; and break the correlation shared by its uses. Reject that nest, but retain
+; interchange for an otherwise-identical profitable control.
+;
+; RUN: opt < %s -passes='loop(loop-interchange),print<loops>' \
+; RUN: -cache-line-size=64 -disable-output 2>&1 \
+; RUN: | FileCheck %s --check-prefix=LOOPS
+; RUN: opt < %s -passes=loop-interchange -cache-line-size=64 \
+; RUN: -pass-remarks-output=%t.yaml -disable-output
+; RUN: FileCheck %s --check-prefix=REMARK --input-file=%t.yaml
+; RUN: llvm-extract -S -func=outer_header_freeze %s -o %t.freeze
+; RUN: opt -S -passes=no-op-loopnest %t.freeze -o %t.noop
+; RUN: opt -S -passes=loop-interchange -cache-line-size=64 \
+; RUN: %t.freeze -o %t.out
+; RUN: diff -u %t.noop %t.out
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+
+define void @profitable_control(ptr noalias %A, ptr noalias %R) {
----------------
MattPD wrote:
Removed.
https://github.com/llvm/llvm-project/pull/213309
More information about the llvm-commits
mailing list