[all-commits] [llvm/llvm-project] e2a071: [MachineCP] Correctly handle register masks and su...
Oliver Stannard via All-commits
all-commits at lists.llvm.org
Mon Jan 13 01:55:30 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e2a071ece58790f8dd4886e998033cab82e906fb
https://github.com/llvm/llvm-project/commit/e2a071ece58790f8dd4886e998033cab82e906fb
Author: Oliver Stannard <oliver.stannard at arm.com>
Date: 2025-01-13 (Mon, 13 Jan 2025)
Changed paths:
M llvm/lib/CodeGen/MachineCopyPropagation.cpp
M llvm/test/CodeGen/AArch64/machine-cp-sub-reg.mir
Log Message:
-----------
[MachineCP] Correctly handle register masks and sub-registers (#122472)
When passing an instruction with a register mask, the machine copy
propagation pass was dropping the information about some copy
instructions which define a register which is preserved by the mask,
because that register overlaps a register which is partially clobbered
by it. This resulted in a miscompilation for AArch64, because this
caused a live copy to be considered dead.
The fix is to clobber register masks by finding the set of reg units
which is preserved by the mask, and clobbering all units not in that
set.
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