[AAArch64][Windows] Fix the crash when running ninja check-asan
authorchenglin.bi <chenglin.bi@linaro.org>
Fri, 21 Oct 2022 14:11:22 +0000 (22:11 +0800)
committerchenglin.bi <chenglin.bi@linaro.org>
Fri, 21 Oct 2022 14:11:54 +0000 (22:11 +0800)
commitec4db1d0dc68c614af2231dbaf4c058fc03bdab0
tree019700dff850ab2b3ac242f1d12ce7eac25d848c
parentfcd545863d27148f26a3ef98bd20501a4df48ec5
[AAArch64][Windows] Fix the crash when running ninja check-asan

The crash comes from mismatch between load count in epilogue and seh instruction count.
Still because of the pass AArch64LoadStoreOpt. It remove some load in the epilogue but haven't remove the corresponding seh instruction.
This patch don't optimize the load in the epilogue to fix the issue.

Fix: #58516

Reviewed By: mstorsjo

Differential Revision: https://reviews.llvm.org/D136430
llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
llvm/test/CodeGen/AArch64/pr58516.ll [new file with mode: 0644]