From ec7caf3fdcfec52d89b9c5f76125532b2873ce0d Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Mon, 12 Feb 2024 14:21:48 +0000 Subject: [PATCH] Improve 32bit ld/st addressing mode propagation --- FEXCore/Source/Interface/IR/Passes/ConstProp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FEXCore/Source/Interface/IR/Passes/ConstProp.cpp b/FEXCore/Source/Interface/IR/Passes/ConstProp.cpp index 12bd140db6..5675b86665 100644 --- a/FEXCore/Source/Interface/IR/Passes/ConstProp.cpp +++ b/FEXCore/Source/Interface/IR/Passes/ConstProp.cpp @@ -525,7 +525,8 @@ bool ConstProp::ConstantPropagation(IREmitter *IREmit, const IRListView& Current auto Op = IROp->CW(); auto AddressHeader = IREmit->GetOpHeader(Op->Addr); - if (AddressHeader->Op == OP_ADD && AddressHeader->Size == 8) { + if (AddressHeader->Op == OP_ADD && + (AddressHeader->Size == 8 || AddressHeader->Size == 4)) { auto [OffsetType, OffsetScale, Arg0, Arg1] = MemExtendedAddressing(IREmit, IROp->Size, AddressHeader); Op->OffsetType = OffsetType; @@ -542,7 +543,8 @@ bool ConstProp::ConstantPropagation(IREmitter *IREmit, const IRListView& Current auto Op = IROp->CW(); auto AddressHeader = IREmit->GetOpHeader(Op->Addr); - if (AddressHeader->Op == OP_ADD && AddressHeader->Size == 8) { + if (AddressHeader->Op == OP_ADD && + (AddressHeader->Size == 8 || AddressHeader->Size == 4)) { auto [OffsetType, OffsetScale, Arg0, Arg1] = MemExtendedAddressing(IREmit, IROp->Size, AddressHeader); Op->OffsetType = OffsetType;