[all-commits] [llvm/llvm-project] fe07ee: [GlobalISel] Fix crash in applyShiftOfShiftedLogic...
chenglin.bi via All-commits
all-commits at lists.llvm.org
Fri Nov 18 17:14:01 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fe07eeb8254021fafe3dc0e88cc59862c1215f40
https://github.com/llvm/llvm-project/commit/fe07eeb8254021fafe3dc0e88cc59862c1215f40
Author: chenglin.bi <chenglin.bi at linaro.org>
Date: 2022-11-19 (Sat, 19 Nov 2022)
Changed paths:
M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
A llvm/test/CodeGen/AArch64/GlobalISel/pr58423.ll
Log Message:
-----------
[GlobalISel] Fix crash in applyShiftOfShiftedLogic caused by CSEMIRBuilder reuse instruction
If LogicNonShiftReg is the same to Shift1Base, and shift1 const is the same to MatchInfo.Shift2 const, CSEMIRBuilder will reuse the old shift1 when build shift2.
So, if we erase MatchInfo.Shift2 at the end, actually we remove old shift1. And it will cause crash later.
Solution for this issue is just erase it earlier to avoid the crash.
Fix #58423
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D138187
More information about the All-commits
mailing list