[all-commits] [llvm/llvm-project] 7e98d1: [LoopFusion] Do not fuse loops with different guar...
Ehsan Amiri via All-commits
all-commits at lists.llvm.org
Tue May 26 15:18:20 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7e98d1960e989945cfb2ec016b950fbd2bb5d937
https://github.com/llvm/llvm-project/commit/7e98d1960e989945cfb2ec016b950fbd2bb5d937
Author: Ehsan Amiri <ehsan.amiri at huawei.com>
Date: 2026-05-26 (Tue, 26 May 2026)
Changed paths:
M llvm/lib/Transforms/Scalar/LoopFuse.cpp
A llvm/test/Transforms/LoopFusion/different_guards.ll
Log Message:
-----------
[LoopFusion] Do not fuse loops with different guards (#199724)
The testcase that was originally contributed to #193641 exposed a
functional issue in which loop fusion can fuse functions with different
loop guards. There seem to two distinct bugs and each of them alone is
enough to let this happen.
- The condition that checks loop guards are identical, intends to
exclude loops that require peeling. But the condition is not correct and
it allows some loops that do not require peeling to pass.
- The condition that checks two guards are identical implicitly assume
conditions of guard branches are instructions, but this is not
necessarily always correct.
This patch fixes the problem for the loops that do not require peeling.
The issue still exists for loops that require peeling and will be fixed
separately.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list