OpcodeDispatcher: optimize DF add

fuse the shift the right way

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
Alyssa Rosenzweig 2024-02-27 13:39:36 -04:00
parent c99cbe6d0a
commit 03c6abdad4

View File

@ -1479,7 +1479,9 @@ private:
// Returns DF ? (X - Size) : (X + Size)
OrderedNode *OffsetByDir(OrderedNode *X, const unsigned Size) {
return _Add(OpSize::i64Bit, X, LoadDir(Size));
auto Shift = FEXCore::ilog2(Size);
return _AddShift(OpSize::i64Bit, X, _LoadDF(), ShiftType::LSL, Shift);
}
// Set SSE comparison flags based on the result set by Arm FCMP. This converts