[all-commits] [llvm/llvm-project] 917574: [MachineLICM][WinEH] Don't hoist register reloads ...
Karl-Johan Johnsson via All-commits
all-commits at lists.llvm.org
Sun Aug 13 14:04:41 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 917574d5d8beacbefab4d0e6469dac5b50117832
https://github.com/llvm/llvm-project/commit/917574d5d8beacbefab4d0e6469dac5b50117832
Author: Karl-Johan Johnsson <kalle at kjjohnsson.se>
Date: 2023-08-13 (Sun, 13 Aug 2023)
Changed paths:
M llvm/lib/CodeGen/MachineLICM.cpp
A llvm/test/CodeGen/X86/machine-licm-vs-wineh.mir
Log Message:
-----------
[MachineLICM][WinEH] Don't hoist register reloads out of funclets
This fixes https://github.com/llvm/llvm-project/issues/60766
With MSVC style exception-handling (funclets), no registers are
alive when entering the funclet so they must be reloaded from the
stack. MachineLICM can sometimes hoist such reloads out of the
funclet which is not correct, the register will have been clobbered
when entering the funclet. This can happen in any loop that
contains a try-catch.
This has been tested on x86_64-pc-window-msvc. I'm not sure if
funclets work the same on the other windows archs.
Reviewed By: rnk, arsenm
Differential Revision: https://reviews.llvm.org/D153337
More information about the All-commits
mailing list