1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Fixed aliasing case during 3-form inst decomposition

This commit is contained in:
Brian Fiete 2024-12-04 08:35:14 -05:00
parent 6a90faddc6
commit bb4e6993c8

View file

@ -9352,7 +9352,9 @@ bool BeMCContext::DoLegalization()
else else
{ {
bool handled = false; bool handled = false;
if (OperandsEqual(inst->mResult, inst->mArg1)) // Check for exact quality or potential aliasing
if ((OperandsEqual(inst->mResult, inst->mArg1)) ||
((HasLoad(inst->mResult)) && (HasLoad(inst->mArg1))))
{ {
// We need a scratch reg for this // We need a scratch reg for this
ReplaceWithNewVReg(inst->mArg1, instIdx, true); ReplaceWithNewVReg(inst->mArg1, instIdx, true);