x87StackOptimizationPass: Set both operands as valid in the tag word for FXCH

This commit is contained in:
Simon Scherer committed 2026-09-04 08:26:17 +02:00
1 parent 45fbab212a
commit e4e45bcc59
1 file changed
+2 -2
@@ -1074,8 +1074,8 @@ void X87StackOptimization::Run(IREmitter* Emit) {
// Slow path: do actual memory operations
Ref ValueTop = LoadStackValue();
Ref ValueOffset = LoadStackValue(Offset);
StoreStackValue(ValueOffset);
StoreStackValue(ValueTop, Offset);
StoreStackValue(ValueOffset, 0, true);
StoreStackValue(ValueTop, Offset, true);
} else {
// Fast path: swap complete StackMemberInfo preserving Source metadata
StackData.setTop(StackMemberOffset, 0);