mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-02-01 20:16:20 +00:00
ConstProp: fix inlining shifted imm to mem instructions
hit by sse4_1-pmaxuw.c.gcc-target-test-64.jit.gcc-target-64 Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
parent
80878ae611
commit
112c49a348
@ -117,6 +117,9 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
// The immediate may be scaled in the IR, we need to correct for that.
|
||||
Imm *= OffsetScale;
|
||||
|
||||
// Signed immediate unscaled 9-bit range for both regular and LRCPC2 ops.
|
||||
bool IsSIMM9 = ((int64_t)Imm >= -256) && ((int64_t)Imm <= 255);
|
||||
IsSIMM9 &= (SupportsTSOImm9 || !TSO);
|
||||
@ -128,6 +131,7 @@ private:
|
||||
if (IsSIMM9 || IsExtended) {
|
||||
IREmit->SetWriteCursor(IR.GetNode(Offset));
|
||||
IREmit->ReplaceNodeArgument(CodeNode, Offset_Index, CreateInlineConstant(IREmit, Imm));
|
||||
OffsetScale = 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user