OpcodeDispatcher: fix folding negative offsets for 32-bit

I don't know what I was thinking when I wrote that code. Drop the silly logic
and let ConstProp inline the immediates. This fixes a lot of silly code
generated for 32-bit.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
Alyssa Rosenzweig committed 2024-08-13 08:41:16 -04:00
1 parent 1351575713
commit 23d07d7d0c
1 file changed
+1 -1
@@ -4311,7 +4311,7 @@ AddressMode OpDispatchBuilder::SelectAddressMode(AddressMode A, bool AtomicTSO,
return {
.Base = A.Base,
.Index = _Constant(A.Offset),
.IndexType = (Const_16K && A.Offset < 0) ? MEM_OFFSET_SXTW : MEM_OFFSET_SXTX,
.IndexType = MEM_OFFSET_SXTX,
.IndexScale = 1,
};
}