[all-commits] [llvm/llvm-project] fee67e: [X86] Don't assert on EFLAGS copies in unreachable...
Paweł Bylica via All-commits
all-commits at lists.llvm.org
Thu Jun 11 05:30:35 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fee67eec6d7f9e40d366c548aa7c59f98ca3b163
https://github.com/llvm/llvm-project/commit/fee67eec6d7f9e40d366c548aa7c59f98ca3b163
Author: Paweł Bylica <pawel at hepcolgum.band>
Date: 2026-06-11 (Thu, 11 Jun 2026)
Changed paths:
M llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
A llvm/test/CodeGen/X86/flags-copy-lowering-unreachable.mir
Log Message:
-----------
[X86] Don't assert on EFLAGS copies in unreachable blocks (#203208)
X86FlagsCopyLowering collects the EFLAGS copies to lower using a
ReversePostOrderTraversal, which only visits blocks reachable from the
entry. Its end-of-pass verification, however, iterated over every block
in the function, so an EFLAGS copy left in an unreachable block (e.g.
produced by ISel for an always-taken branch whose other edge is dead)
tripped the "Unlowered EFLAGS copy!" assertion.
Such copies are harmless: the unreachable block is removed by the
unreachable-block elimination pass that runs right after this one,
before register allocation, so the copy never reaches a pass that cannot
handle it. Restrict the verification to reachable blocks (depth_first
from the entry) to match the set of blocks actually processed.
Found via fuzzing (llvm-isel-fuzzer).
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